| 1 |
// RUN: %clang -### %s -target arm-none-none-eabi -march=armv8a -mfix-cortex-a57-aes-1742098 2>&1 | FileCheck %s --check-prefix=FIX |
| 2 |
// RUN: %clang -### %s -target arm-none-none-eabi -march=armv8a -mno-fix-cortex-a57-aes-1742098 2>&1 | FileCheck %s --check-prefix=NO-FIX |
| 3 |
|
| 4 |
// RUN: %clang -### %s -target arm-none-none-eabi -march=armv8a -mfix-cortex-a72-aes-1655431 2>&1 | FileCheck %s --check-prefix=FIX |
| 5 |
// RUN: %clang -### %s -target arm-none-none-eabi -march=armv8a -mno-fix-cortex-a72-aes-1655431 2>&1 | FileCheck %s --check-prefix=NO-FIX |
| 6 |
|
| 7 |
// RUN: %clang -### %s -target arm-none-none-eabi -march=armv8a 2>&1 | FileCheck %s --check-prefix=UNSPEC |
| 8 |
// RUN: %clang -### %s -target arm-none-none-eabi -march=armv8a 2>&1 | FileCheck %s --check-prefix=UNSPEC |
| 9 |
|
| 10 |
// This test checks that "-m(no-)fix-cortex-a57-aes-1742098" and |
| 11 |
// "-m(no-)fix-cortex-a72-aes-1655431" cause the "fix-cortex-a57-aes-1742098" |
| 12 |
// target feature to be passed to `clang -cc1`. |
| 13 |
// |
| 14 |
// This feature is also enabled in the backend for the two affected CPUs and the |
| 15 |
// "generic" cpu (used when only specifying -march), but that won't show up on |
| 16 |
// the `clang -cc1` command line. |
| 17 |
// |
| 18 |
// We do not check whether this option is correctly specified for the CPU: users |
| 19 |
// can specify the "-mfix-cortex-a57-aes-1742098" option with "-mcpu=cortex-a72" |
| 20 |
// and vice-versa, and will still get the fix, as the target feature and the fix |
| 21 |
// is the same in both cases. |
| 22 |
|
| 23 |
// FIX: "-target-feature" "+fix-cortex-a57-aes-1742098" |
| 24 |
// NO-FIX: "-target-feature" "-fix-cortex-a57-aes-1742098" |
| 25 |
// UNSPEC-NOT: "-target-feature" "{[+-]}fix-cortex-a57-aes-1742098" |