xref: /llvm-project/llvm/test/CodeGen/ARM/execute-only-section.ll (revision 2273741ea2547ecda28cb01d7679d0563b35ac16)
1; RUN: llc < %s -mtriple=thumbv6m -mattr=+execute-only %s -o - | FileCheck %s
2; RUN: llc < %s -mtriple=thumbv7m -mattr=+execute-only %s -o - | FileCheck %s
3; RUN: llc < %s -mtriple=thumbv8m.base -mattr=+execute-only %s -o - | FileCheck %s
4; RUN: llc < %s -mtriple=thumbv8m.base -mcpu=cortex-m23 -mattr=+execute-only %s -o - | FileCheck %s
5; RUN: llc < %s -mtriple=thumbv8m.main -mattr=+execute-only %s -o - | FileCheck %s
6
7; CHECK:     .section .text,"axy",%progbits,unique,0
8; CHECK-NOT: .section
9; CHECK-NOT: .text
10; CHECK:     .globl test_SectionForGlobal
11; CHECK:     .type test_SectionForGlobal,%function
12define void @test_SectionForGlobal() {
13entry:
14  ret void
15}
16
17; CHECK:     .section .test,"axy",%progbits
18; CHECK-NOT: .section
19; CHECK-NOT: .text
20; CHECK:     .globl test_ExplicitSectionForGlobal
21; CHECK:     .type test_ExplicitSectionForGlobal,%function
22define void @test_ExplicitSectionForGlobal() section ".test" {
23entry:
24  ret void
25}
26