1 // Test that different values of -mhwdiv pick correct ARM hwdiv target-feature(s). 2 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" 7 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" 12 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" 17 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" 22 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" 27 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" 32 33 // Also check the alternative syntax. 34 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" 39 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" 44 45