[libc] Switch to using the generic `<gpuintrin.h>` implementations (#121810)
[llvm-project.git] / clang / test / Driver / print-multi-selection-flags.c
blob5bf6dca5096a731658d09197f28f38d61070cc4a
1 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=aarch64-linux -fc++-abi=itanium -fsanitize=address | FileCheck --check-prefix=CHECK-LINUX %s
2 // CHECK-LINUX: --target=aarch64-unknown-linux
4 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=aarch64-fuchsia -fsanitize=hwaddress | FileCheck --check-prefix=CHECK-FUCHSIA %s
5 // CHECK-FUCHSIA: --target=aarch64-unknown-fuchsia
7 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=arm-none-eabi -mfloat-abi=soft -fno-exceptions -fno-rtti | FileCheck --check-prefix=CHECK-ARMV4T %s
8 // CHECK-ARMV4T: --target=armv4t-unknown-none-eabi
9 // CHECK-ARMV4T: -mfloat-abi=soft
10 // CHECK-ARMV4T: -mfpu=none
12 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=armv7em-none-eabi -mfloat-abi=softfp | FileCheck --check-prefix=CHECK-SOFTFP %s
13 // CHECK-SOFTFP: --target=thumbv7em-unknown-none-eabi
14 // CHECK-SOFTFP: -mfloat-abi=softfp
15 // CHECK-SOFTFP: -mfpu=fpv4-sp-d16
17 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=arm-none-eabihf -march=armv7em -mfpu=fpv5-d16 | FileCheck --check-prefix=CHECK-HARD %s
18 // CHECK-HARD: --target=thumbv7em-unknown-none-eabihf
19 // CHECK-HARD: -mfloat-abi=hard
20 // CHECK-HARD: -mfpu=fpv5-d16
22 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=aarch64-none-elf -mabi=aapcs | FileCheck --check-prefix=CHECK-ABI-AAPCS %s
23 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=aarch64-none-elf -mabi=aapcs-soft | FileCheck --check-prefix=CHECK-ABI-AAPCS-SOFT %s
24 // CHECK-ABI-AAPCS: -mabi=aapcs
25 // CHECK-ABI-AAPCS-SOFT: -mabi=aapcs-soft
27 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=arm-none-eabi -mfloat-abi=soft -march=armv8-m.main+nofp | FileCheck --check-prefix=CHECK-V8MMAIN-NOFP %s
28 // CHECK-V8MMAIN-NOFP: --target=thumbv8m.main-unknown-none-eabi
29 // CHECK-V8MMAIN-NOFP: -mfloat-abi=soft
30 // CHECK-V8MMAIN-NOFP: -mfpu=none
32 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=arm-none-eabi -mfloat-abi=hard -march=armv8.1m.main+mve.fp | FileCheck --check-prefix=CHECK-MVE %s
33 // CHECK-MVE: --target=thumbv8.1m.main-unknown-none-eabihf
34 // CHECK-MVE: -march=thumbv8.1m.main{{.*}}+mve{{.*}}+mve.fp{{.*}}
35 // CHECK-MVE: -mfloat-abi=hard
36 // CHECK-MVE: -mfpu=fp-armv8-fullfp16-sp-d16
38 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=arm-none-eabi -march=armv8.1m.main+mve+nofp | FileCheck --check-prefix=CHECK-MVENOFP %s
39 // CHECK-MVENOFP: -march=thumbv8.1m.main{{.*}}+mve{{.*}}
40 // CHECK-MVENOFP-NOT: -march=thumbv8.1m.main{{.*}}+mve.fp{{.*}}
41 // CHECK-MVENOFP: -mfpu=none
43 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=arm-none-eabihf -march=armv8.1m.main+fp.dp | FileCheck --check-prefix=CHECK-V8_1_FP_DP %s
44 // CHECK-V8_1_FP_DP: -march=thumbv8.1m.main{{.*}}
45 // CHECK-V8_1_FP_DP: -mfloat-abi=hard
46 // CHECK-V8_1_FP_DP: -mfpu=fp-armv8-fullfp16-d16
48 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=arm-none-eabihf -march=armv8.1m.main+nofp+fp+nofp.dp | FileCheck --check-prefix=CHECK-V8_1_NO_FP_DP %s
49 // CHECK-V8_1_NO_FP_DP: -march=thumbv8.1m.main{{.*}}
50 // CHECK-V8_1_NO_FP_DP: -mfloat-abi=hard
51 // CHECK-V8_1_NO_FP_DP: -mfpu=fp-armv8-fullfp16-sp-d16
53 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=arm-none-eabihf -mcpu=cortex-m85+nofp.dp | FileCheck --check-prefix=CHECK-M85_NO_FP_DP %s
54 // CHECK-M85_NO_FP_DP: -march=thumbv8.1m.main{{.*}}
55 // CHECK-M85_NO_FP_DP: -mfloat-abi=hard
56 // CHECK-M85_NO_FP_DP: -mfpu=fp-armv8-fullfp16-sp-d16
58 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=aarch64-none-elf -march=armv8-a+lse | FileCheck --check-prefix=CHECK-LSE %s
59 // CHECK-LSE: --target=aarch64-unknown-none-elf
60 // CHECK-LSE: -march=armv8-a{{.*}}+lse{{.*}}
62 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=aarch64-none-elf -march=armv8.5-a+sve+sve2 | FileCheck --check-prefix=CHECK-SVE2 %s
63 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=aarch64-none-elf -march=armv9-a | FileCheck --check-prefix=CHECK-SVE2 %s
64 // CHECK-SVE2: --target=aarch64-unknown-none-elf
65 // CHECK-SVE2: -march=armv{{.*}}-a{{.*}}+simd{{.*}}+sve{{.*}}+sve2{{.*}}
67 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=arm-none-eabi -mbranch-protection=standard | FileCheck --check-prefix=CHECK-BRANCH-PROTECTION %s
68 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=aarch64-none-elf -mbranch-protection=standard | FileCheck --check-prefix=CHECK-BRANCH-PROTECTION %s
69 // CHECK-BRANCH-PROTECTION: -mbranch-protection=standard
71 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=arm-none-eabi -mno-unaligned-access | FileCheck --check-prefix=CHECK-NO-UNALIGNED-ACCESS %s
72 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=aarch64-none-elf -mno-unaligned-access | FileCheck --check-prefix=CHECK-NO-UNALIGNED-ACCESS %s
73 // CHECK-NO-UNALIGNED-ACCESS: -mno-unaligned-access
75 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=arm-none-eabi -mbig-endian | FileCheck --check-prefix=CHECK-BIG-ENDIAN %s
76 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=aarch64-none-elf -mbig-endian | FileCheck --check-prefix=CHECK-BIG-ENDIAN %s
77 // CHECK-BIG-ENDIAN: -mbig-endian
79 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=riscv32-none-elf -march=rv32g | FileCheck --check-prefix=CHECK-RV32 %s
80 // CHECK-RV32: --target=riscv32-unknown-none-elf
81 // CHECK-RV32: -mabi=ilp32d
82 // CHECK-RV32: -march=rv32i{{[0-9]+p[0-9]+}}_m{{[0-9]+p[0-9]+}}_a{{[0-9]+p[0-9]+}}_f{{[0-9]+p[0-9]+}}_d{{[0-9]+p[0-9]+}}_zicsr{{[0-9]+p[0-9]+}}_zifencei{{[0-9]+p[0-9]+}}_zmmul{{[0-9]+p[0-9]+}}
84 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=riscv64-none-elf -march=rv64g | FileCheck --check-prefix=CHECK-RV64 %s
85 // CHECK-RV64: --target=riscv64-unknown-none-elf
86 // CHECK-RV64: -mabi=lp64d
87 // CHECK-RV64: -march=rv64i{{[0-9]+p[0-9]+}}_m{{[0-9]+p[0-9]+}}_a{{[0-9]+p[0-9]+}}_f{{[0-9]+p[0-9]+}}_d{{[0-9]+p[0-9]+}}_zicsr{{[0-9]+p[0-9]+}}_zifencei{{[0-9]+p[0-9]+}}_zmmul{{[0-9]+p[0-9]+}}
89 // RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=riscv32-none-elf -march=rv32e_zicsr_c | FileCheck --check-prefix=CHECK-RV32E-ORDER %s
90 // CHECK-RV32E-ORDER: --target=riscv32-unknown-none-elf
91 // CHECK-RV32E-ORDER: -mabi=ilp32e
92 // CHECK-RV32E-ORDER: -march=rv32e{{[0-9]+p[0-9]+}}_c{{[0-9]+p[0-9]+}}_zicsr{{[0-9]+p[0-9]+}}