1 // Test that target feature the is implemented and available correctly
3 // FEAT_THE is optional (off by default) for v8.9a/9.4a, and can be disabled using +nothe
4 // RUN: %clang -### --target=aarch64-none-elf -march=armv8.9-a %s 2>&1 | FileCheck %s --check-prefix=NOT_ENABLED
5 // RUN: %clang -### --target=aarch64-none-elf -march=armv8.9-a+the %s 2>&1 | FileCheck %s --check-prefix=ENABLED
6 // RUN: %clang -### --target=aarch64-none-elf -march=armv8.9-a+nothe %s 2>&1 | FileCheck %s --check-prefix=DISABLED
7 // RUN: %clang -### --target=aarch64-none-elf -march=armv9.4-a %s 2>&1 | FileCheck %s --check-prefix=NOT_ENABLED
8 // RUN: %clang -### --target=aarch64-none-elf -march=armv9.4-a+the %s 2>&1 | FileCheck %s --check-prefix=ENABLED
9 // RUN: %clang -### --target=aarch64-none-elf -march=armv9.4-a+nothe %s 2>&1 | FileCheck %s --check-prefix=DISABLED
11 // FEAT_THE is optional (off by default) for v8.8a/9.3a and older, and can be enabled using +the
12 // RUN: %clang -### --target=aarch64-none-elf -march=armv8.8-a %s 2>&1 | FileCheck %s --check-prefix=NOT_ENABLED
13 // RUN: %clang -### --target=aarch64-none-elf -march=armv8.8-a+the %s 2>&1 | FileCheck %s --check-prefix=ENABLED
14 // RUN: %clang -### --target=aarch64-none-elf -march=armv8.8-a+nothe %s 2>&1 | FileCheck %s --check-prefix=DISABLED
15 // RUN: %clang -### --target=aarch64-none-elf -march=armv9.3-a %s 2>&1 | FileCheck %s --check-prefix=NOT_ENABLED
16 // RUN: %clang -### --target=aarch64-none-elf -march=armv9.3-a+the %s 2>&1 | FileCheck %s --check-prefix=ENABLED
17 // RUN: %clang -### --target=aarch64-none-elf -march=armv9.3-a+nothe %s 2>&1 | FileCheck %s --check-prefix=DISABLED
19 // FEAT_THE is invalid before v8
20 // RUN: not %clang -### --target=arm-none-none-eabi -march=armv7-a+the %s 2>&1 | FileCheck %s --check-prefix=INVALID
22 // INVALID: error: unsupported argument 'armv7-a+the' to option '-march='
23 // ENABLED: "-target-feature" "+the"
24 // NOT_ENABLED-NOT: "-target-feature" "+the"
25 // DISABLED: "-target-feature" "-the"