[RISCV][FMV] Support target_clones (#85786)
[llvm-project.git] / clang / test / Driver / arm-hwdiv.c
blob0b75948d2b986b4a3a13d411a8744db9dd0df205
1 // Test that different values of -mhwdiv pick correct ARM hwdiv target-feature(s).
3 // RUN: %clang -### -target arm %s -o %t.o 2>&1 \
4 // RUN: | FileCheck --check-prefix=CHECK-DEFAULT %s
5 // CHECK-DEFAULT-NOT: "-target-feature" "+hwdiv"
6 // CHECK-DEFAULT-NOT: "-target-feature" "+hwdiv-arm"
8 // RUN: %clang -### -target arm %s -mhwdiv=arm -o %t.o 2>&1 \
9 // RUN: | FileCheck --check-prefix=CHECK-ARM %s
10 // CHECK-ARM: "-target-feature" "+hwdiv-arm"
11 // CHECK-ARM: "-target-feature" "-hwdiv"
13 // RUN: %clang -### -target arm %s -mhwdiv=thumb -o %t.o 2>&1 \
14 // RUN: | FileCheck --check-prefix=CHECK-THUMB %s
15 // CHECK-THUMB: "-target-feature" "-hwdiv-arm"
16 // CHECK-THUMB: "-target-feature" "+hwdiv"
18 // RUN: %clang -### -target arm %s -mhwdiv=arm,thumb -o %t.o 2>&1 \
19 // RUN: | FileCheck --check-prefix=CHECK-ARM-THUMB %s
20 // CHECK-ARM-THUMB: "-target-feature" "+hwdiv-arm"
21 // CHECK-ARM-THUMB: "-target-feature" "+hwdiv"
23 // RUN: %clang -### -target arm %s -mhwdiv=thumb,arm -o %t.o 2>&1 \
24 // RUN: | FileCheck --check-prefix=CHECK-THUMB-ARM %s
25 // CHECK-THUMB-ARM: "-target-feature" "+hwdiv-arm"
26 // CHECK-THUMB-ARM: "-target-feature" "+hwdiv"
28 // RUN: %clang -### -target arm %s -mhwdiv=none -o %t.o 2>&1 \
29 // RUN: | FileCheck --check-prefix=CHECK-NONE %s
30 // CHECK-NONE: "-target-feature" "-hwdiv-arm"
31 // CHECK-NONE: "-target-feature" "-hwdiv"
33 // Also check the alternative syntax.
35 // RUN: %clang -### -target arm %s --mhwdiv arm -o %t.o 2>&1 \
36 // RUN: | FileCheck --check-prefix=CHECK-ALT %s
37 // CHECK-ALT: "-target-feature" "+hwdiv-arm"
38 // CHECK-ALT: "-target-feature" "-hwdiv"
40 // RUN: %clang -### -target arm %s --mhwdiv=arm -o %t.o 2>&1 \
41 // RUN: | FileCheck --check-prefix=CHECK-ALT-EQ %s
42 // CHECK-ALT-EQ: "-target-feature" "+hwdiv-arm"
43 // CHECK-ALT-EQ: "-target-feature" "-hwdiv"