Skip to content

Commit 1239704

Browse files
committed
review tests; delete or move some tests
1 parent f808cb0 commit 1239704

3 files changed

Lines changed: 21 additions & 31 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Check that explicit -mcpu=<cpu>+no<feature> preserves -<feature> option and removes the feature when the feature is implied by the CPU or its base architecture.
2+
// SVE and RandGen are default features of neoverse-v2 (defined in AArch64Processors.td).
3+
// SVE and SB are default features of armv9 (defined in AArch64Features.td).
4+
// SHA2 is not part of the default feature set for either Neoverse V2 or Armv9.
5+
6+
// RUN: %clang --target=aarch64-linux-gnu -mcpu=neoverse-v2+nosve %s -### 2>&1 | FileCheck %s --check-prefix=NEOVERSE-V2-NOSVE
7+
// NEOVERSE-V2-NOSVE: "-target-feature" "-sve"
8+
9+
// RUN: %clang --target=aarch64-linux-gnu -mcpu=neoverse-v2+norng %s -### 2>&1 | FileCheck %s --check-prefix=NEOVERSE-V2-NORNG
10+
// NEOVERSE-V2-NORNG: "-target-feature" "-rand"
11+
12+
// RUN: %clang --target=aarch64-linux-gnu -mcpu=neoverse-v2+nosb %s -### 2>&1 | FileCheck %s --check-prefix=NEOVERSE-V2-NOSB
13+
// NEOVERSE-V2-NOSB: "-target-feature" "-sb"
14+
15+
// RUN: %clang --target=aarch64-linux-gnu -mcpu=neoverse-v2+nosha2 %s -### 2>&1 | FileCheck %s --check-prefix=NEOVERSE-V2-NOSHA2
16+
// NEOVERSE-V2-NOSHA2-NOT: "-target-feature" "+sha2"
17+
// NEOVERSE-V2-NOSHA2-NOT: "-target-feature" "-sha2"

clang/test/Driver/aarch64-no-feat.c

Lines changed: 0 additions & 31 deletions
This file was deleted.

clang/test/Driver/arm-sb.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@
1414
// RUN: %clang -### -target aarch64-none-elf -march=armv8.5a+nosb %s 2>&1 | FileCheck %s --check-prefix=NOSB
1515
// ABSENT-NOT: "-target-feature" "+sb"
1616
// ABSENT-NOT: "-target-feature" "-sb"
17+
18+
// RUN: %clang -### -target aarch64-none-elf -mcpu=neoverse-v2+sb %s 2>&1 | FileCheck %s --check-prefix=REDUNDANT
19+
// REDUNDANT-NOT: "-target-feature" "+sb"
20+
// REDUNDANT-NOT: "-target-feature" "-sb"

0 commit comments

Comments
 (0)