Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Driver / aarch64-implied-sme-features.c
blob2277aceb881d73b3fb4f79c350303f6aa6b7aa9c
1 // RUN: %clang -target aarch64-linux-gnu -march=armv8-a+sme %s -### 2>&1 | FileCheck %s --check-prefix=SME-IMPLY
2 // SME-IMPLY: "-target-feature" "+sme" "-target-feature" "+bf16"
4 // RUN: %clang -target aarch64-linux-gnu -march=armv8-a+nosme %s -### 2>&1 | FileCheck %s --check-prefix=NOSME
5 // NOSME: "-target-feature" "-sme"
7 // RUN: %clang -target aarch64-linux-gnu -march=armv8-a+sme+nosme %s -### 2>&1 | FileCheck %s --check-prefix=SME-REVERT
8 // SME-REVERT-NOT: "-target-feature" "+sme"
9 // SME-REVERT: "-target-feature" "+bf16" "-target-feature" "-sme" "-target-feature" "-sme-f64f64" "-target-feature" "-sme-i16i64"
11 // RUN: %clang -target aarch64-linux-gnu -march=armv8-a+sme+nobf16 %s -### 2>&1 | FileCheck %s --check-prefix=SME-CONFLICT
12 // SME-CONFLICT-NOT: "-target-feature" "+sme"
13 // SME-CONFLICT-NOT: "-target-feature" "+bf16"
14 // SME-CONFLICT: "-target-feature" "-bf16" "-target-feature" "-sme" "-target-feature" "-sme-f64f64" "-target-feature" "-sme-i16i64"
16 // RUN: %clang -target aarch64-linux-gnu -march=armv8-a+sme-i16i64 %s -### 2>&1 | FileCheck %s --check-prefix=SME-I16I64
17 // SME-I16I64: "-target-feature" "+sme-i16i64" "-target-feature" "+sme" "-target-feature" "+bf16"
19 // RUN: %clang -target aarch64-linux-gnu -march=armv8-a+nosme-i16i64 %s -### 2>&1 | FileCheck %s --check-prefix=NOSME-I16I64
20 // NOSME-I16I64-NOT: "-target-feature" "+sme-i16i64"
21 // NOSME-I16I64-NOT: "-target-feature" "+sme"
22 // NOSME-I16I64-NOT: "-target-feature" "+bf16"
23 // NOSME-I16I64: "-target-feature" "-sme-i16i64"
25 // RUN: %clang -target aarch64-linux-gnu -march=armv8-a+sme-i16i64+nosme-i16i64 %s -### 2>&1 | FileCheck %s --check-prefix=SME-I16I64-REVERT
26 // SME-I16I64-REVERT: "-target-feature" "+sme" "-target-feature" "+bf16" "-target-feature" "-sme-i16i64"
28 // RUN: %clang -target aarch64-linux-gnu -march=armv8-a+nosme-f64f64 %s -### 2>&1 | FileCheck %s --check-prefix=NOSME-F64F64
29 // NOSME-F64F64-NOT: "-target-feature" "+sme-f64f64"
30 // NOSME-F64F64-NOT: "-target-feature" "+sme"
31 // NOSME-F64F64-NOT: "-target-feature" "+bf16"
32 // NOSME-F64F64: "-target-feature" "-sme-f64f64"
34 // RUN: %clang -target aarch64-linux-gnu -march=armv8-a+sme-f64f64+nosme-f64f64 %s -### 2>&1 | FileCheck %s --check-prefix=SME-F64F64-REVERT
35 // SME-F64F64-REVERT: "-target-feature" "+sme" "-target-feature" "+bf16" "-target-feature" "-sme-f64f64"
37 // RUN: %clang -target aarch64-linux-gnu -march=armv8-a+sme-f64f64+nosme-i16i64 %s -### 2>&1 | FileCheck %s --check-prefix=SME-SUBFEATURE-MIX
38 // SME-SUBFEATURE-MIX: "-target-feature" "+sme-f64f64" "-target-feature" "+sme" "-target-feature" "+bf16" "-target-feature" "-sme-i16i64"
40 // RUN: %clang -target aarch64-linux-gnu -march=armv8-a+sme-i16i64+nosme %s -### 2>&1 | FileCheck %s --check-prefix=SME-SUBFEATURE-CONFLICT1
41 // SME-SUBFEATURE-CONFLICT1: "-target-feature" "+bf16" "-target-feature" "-sme" "-target-feature" "-sme-f64f64" "-target-feature" "-sme-i16i64"
43 // RUN: %clang -target aarch64-linux-gnu -march=armv8-a+sme-f64f64+nobf16 %s -### 2>&1 | FileCheck %s --check-prefix=SME-SUBFEATURE-CONFLICT2
44 // SME-SUBFEATURE-CONFLICT2-NOT: "-target-feature" "+bf16"
45 // SME-SUBFEATURE-CONFLICT2-NOT: "-target-feature" "+sme"
46 // SME-SUBFEATURE-CONFLICT2-NOT: "-target-feature" "+sme-f64f64"
48 // RUN: %clang -target aarch64-linux-gnu -march=armv8-a+nosme+sme-i16i64 %s -### 2>&1 | FileCheck %s --check-prefix=SME-SUBFEATURE-CONFLICT-REV
49 // SME-SUBFEATURE-CONFLICT-REV: "-target-feature" "-sme-f64f64" "-target-feature" "+sme-i16i64" "-target-feature" "+sme" "-target-feature" "+bf16"