Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / arm-thumb-mode-target-feature.c
blob2b86529dc634d4e587504c8b54d73aab8882ecab
1 // REQUIRES: arm-registered-target
3 // RUN: %clang_cc1 -triple thumbv7-linux-gnueabihf -emit-llvm -o - %s | FileCheck --check-prefix THUMB %s
4 // RUN: %clang_cc1 -triple thumbv7eb-linux-gnueabihf -emit-llvm -o - %s | FileCheck --check-prefix THUMB %s
5 // RUN: %clang -target armv7-linux-gnueabihf -mthumb -S -emit-llvm -o - %s | FileCheck --check-prefix THUMB-CLANG %s
6 // RUN: %clang_cc1 -triple armv7-linux-gnueabihf -emit-llvm -o - %s | FileCheck --check-prefix ARM %s
7 // RUN: %clang_cc1 -triple armv7eb-linux-gnueabihf -emit-llvm -o - %s | FileCheck --check-prefix ARM %s
9 void t1() {}
11 __attribute__((target("no-thumb-mode")))
12 void t2() {}
14 __attribute__((target("thumb-mode")))
15 void t3() {}
17 // THUMB: void @t1() [[ThumbAttr:#[0-7]]]
18 // THUMB: void @t2() [[NoThumbAttr:#[0-7]]]
19 // THUMB: void @t3() [[ThumbAttr:#[0-7]]]
20 // THUMB: attributes [[ThumbAttr]] = { {{.*}} "target-features"="+armv7-a,+thumb-mode"
21 // THUMB: attributes [[NoThumbAttr]] = { {{.*}} "target-features"="+armv7-a,-thumb-mode"
23 // THUMB-CLANG: void @t1() [[ThumbAttr:#[0-7]]]
24 // THUMB-CLANG: void @t2() [[NoThumbAttr:#[0-7]]]
25 // THUMB-CLANG: void @t3() [[ThumbAttr:#[0-7]]]
26 // THUMB-CLANG: attributes [[ThumbAttr]] = { {{.*}} "target-features"="{{.*}}+thumb-mode
27 // THUMB-CLANG: attributes [[NoThumbAttr]] = { {{.*}} "target-features"="{{.*}}-thumb-mode
29 // ARM: void @t1() [[NoThumbAtr:#[0-7]]]
30 // ARM: void @t2() [[NoThumbAttr:#[0-7]]]
31 // ARM: void @t3() [[ThumbAttr:#[0-7]]]
32 // ARM: attributes [[NoThumbAttr]] = { {{.*}} "target-features"="+armv7-a,-thumb-mode"
33 // ARM: attributes [[ThumbAttr]] = { {{.*}} "target-features"="+armv7-a,+thumb-mode"