Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Driver / armv8.1m.main.c
blobeef395c98891e5b9b45753192c75003eb5b73ba6
1 // RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+dsp -### %s 2> %t
2 // RUN: FileCheck --check-prefix=CHECK-DSP < %t %s
3 // CHECK-DSP: "-target-feature" "+dsp"
5 // RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+pacbti -### %s 2> %t
6 // RUN: FileCheck --check-prefix=CHECK-PACBTI < %t %s
7 // CHECK-PACBTI: "-target-feature" "+pacbti"
9 // RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+fp -### %s 2> %t
10 // RUN: FileCheck --check-prefix=CHECK-FP < %t %s
11 // CHECK-FP-DAG: "-target-feature" "+fp-armv8d16sp"
12 // CHECK-FP-NOT: "-target-feature" "+fp-armv8d16"
13 // CHECK-FP-NOT: "-target-feature" "+fp-armv8sp"
14 // CHECK-FP-NOT: "-target-feature" "+fp-armv8"
15 // CHECK-FP-NOT: "-target-feature" "+fp64"
16 // CHECK-FP-NOT: "-target-feature" "+d32"
17 // CHECK-FP-DAG: "-target-feature" "+fullfp16"
19 // RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+nofp -### %s 2> %t
20 // RUN: FileCheck --check-prefix=CHECK-NOFP < %t %s
21 // CHECK-NOFP-DAG: "-target-feature" "-vfp2"
22 // CHECK-NOFP-DAG: "-target-feature" "-vfp3"
23 // CHECK-NOFP-DAG: "-target-feature" "-fp16"
24 // CHECK-NOFP-DAG: "-target-feature" "-vfp4"
25 // CHECK-NOFP-DAG: "-target-feature" "-fp-armv8"
26 // CHECK-NOFP-DAG: "-target-feature" "-fp64"
27 // CHECK-NOFP-DAG: "-target-feature" "-d32"
28 // CHECK-NOFP-DAG: "-target-feature" "-neon"
29 // CHECK-NOFP-DAG: "-target-feature" "-sha2"
30 // CHECK-NOFP-DAG: "-target-feature" "-aes"
32 // RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+fp.dp -### %s 2> %t
33 // RUN: FileCheck --check-prefix=CHECK-FPDP < %t %s
34 // CHECK-FPDP-NOT: "-target-feature" "+fp-armv8sp"
35 // CHECK-FPDP-DAG: "-target-feature" "+fp-armv8d16"
36 // CHECK-FPDP-NOT: "-target-feature" "+fp-armv8"
37 // CHECK-FPDP-DAG: "-target-feature" "+fullfp16"
38 // CHECK-FPDP-DAG: "-target-feature" "+fp64"
39 // CHECK-FPDP-NOT: "-target-feature" "+d32"
41 // RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+nofp.dp -### %s 2> %t
42 // RUN: FileCheck --check-prefix=CHECK-NOFPDP < %t %s
43 // CHECK-NOFPDP-DAG: "-target-feature" "-fp64"
45 // RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve -### %s 2> %t
46 // RUN: FileCheck --check-prefix=CHECK-MVE < %t %s
47 // CHECK-MVE-DAG: "-target-feature" "+mve"
49 // RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+nomve -### %s 2> %t
50 // RUN: FileCheck --check-prefix=CHECK-NOMVE < %t %s
51 // CHECK-NOMVE-DAG: "-target-feature" "-mve"
53 // RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve.fp -### %s 2> %t
54 // RUN: FileCheck --check-prefix=CHECK-MVEFP < %t %s
55 // CHECK-MVEFP-DAG: "-target-feature" "+mve.fp"
56 // CHECK-MVEFP-NOT: "-target-feature" "+fp64"
58 // RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+nomve.fp -### %s 2> %t
59 // RUN: FileCheck --check-prefix=CHECK-NOMVEFP < %t %s
60 // CHECK-NOMVEFP: "-target-feature" "-mve.fp"
62 // RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve.fp+fp.dp -### %s 2> %t
63 // RUN: FileCheck --check-prefix=CHECK-MVEFP_DP < %t %s
64 // CHECK-MVEFP_DP-DAG: "-target-feature" "+mve.fp"
65 // CHECK-MVEFP_DP-DAG: "-target-feature" "+fp64"
67 double foo (double a) { return a; }