Skip to content

Commit 0937a24

Browse files
jroelofsyuxuanchen1997
authored andcommitted
Revert "[clang][test] Split AArch64 target feature checks across multiple lines. NFC (#99365)"
Summary: This reverts commit 06518ce. This reverts commit 05275b0. This reverts commit c0c4ad5. Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251348
1 parent 3ce24a3 commit 0937a24

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

clang/test/Preprocessor/aarch64-target-features.c

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,8 +536,62 @@
536536
// RUN: %clang -target arm64-none-linux-gnu -march=armv8-a -mbranch-protection=standard -x c -E -dM %s -o - | FileCheck -check-prefix=CHECK-BTI %s
537537
// RUN: %clang -target arm64-none-linux-gnu -march=armv8-a -mbranch-protection=bti -x c -E -dM %s -o - | FileCheck -check-prefix=CHECK-BTI %s
538538
// RUN: %clang -target arm64-none-linux-gnu -march=armv8-a -mbranch-protection=pac-ret+bti -x c -E -dM %s -o - | FileCheck -check-prefix=CHECK-BTI %s
539+
// CHECK-BTI-OFF-NOT: __ARM_FEATURE_BTI_DEFAULT
540+
// CHECK-BTI: #define __ARM_FEATURE_BTI_DEFAULT 1
541+
542+
// ================== Check Armv8.5-A random number generation extension.
543+
// RUN: %clang -target aarch64-none-elf -march=armv8.5-a+rng -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-RNG %s
544+
// RUN: %clang -target aarch64-none-elf -march=armv8.5-a -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-NO-RNG %s
545+
// CHECK-RNG: __ARM_FEATURE_RNG 1
546+
// CHECK-NO-RNG-NOT: __ARM_FEATURE_RNG 1
547+
548+
// ================== Check BFloat16 Extensions.
549+
// RUN: %clang -target aarch64-none-elf -march=armv8.6-a+bf16 -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-BFLOAT %s
550+
// CHECK-BFLOAT: __ARM_BF16_FORMAT_ALTERNATIVE 1
551+
// CHECK-BFLOAT: __ARM_FEATURE_BF16 1
552+
// CHECK-BFLOAT: __ARM_FEATURE_BF16_VECTOR_ARITHMETIC 1
553+
554+
// ================== Check Armv8.7-A LS64 extension.
555+
// RUN: %clang -target aarch64-none-elf -march=armv8.7-a+ls64 -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-LS64 %s
556+
// RUN: %clang -target aarch64-none-elf -march=armv8.7-a -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-NO-LS64 %s
557+
// CHECK-LS64: __ARM_FEATURE_LS64 1
558+
// CHECK-NO-LS64-NOT: __ARM_FEATURE_LS64 1
559+
560+
// ================== Check sve-vector-bits flag.
561+
// RUN: %clang -target aarch64-none-elf -march=armv8-a+sve -msve-vector-bits=128 -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-SVE-VECTOR-BITS -D#VBITS=128 %s
562+
// RUN: %clang -target aarch64-none-elf -march=armv8-a+sve -msve-vector-bits=256 -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-SVE-VECTOR-BITS -D#VBITS=256 %s
563+
// RUN: %clang -target aarch64-none-elf -march=armv8-a+sve -msve-vector-bits=512 -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-SVE-VECTOR-BITS -D#VBITS=512 %s
564+
// RUN: %clang -target aarch64-none-elf -march=armv8-a+sve -msve-vector-bits=1024 -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-SVE-VECTOR-BITS -D#VBITS=1024 %s
565+
// RUN: %clang -target aarch64-none-elf -march=armv8-a+sve -msve-vector-bits=2048 -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-SVE-VECTOR-BITS -D#VBITS=2048 %s
566+
// RUN: %clang -target aarch64-none-elf -march=armv8-a+sve -msve-vector-bits=512+ -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-NO-SVE-VECTOR-BITS %s
567+
// CHECK-SVE-VECTOR-BITS: __ARM_FEATURE_SVE_BITS [[#VBITS:]]
568+
// CHECK-NO-SVE-VECTOR-BITS-NOT: __ARM_FEATURE_SVE_BITS
569+
570+
// ================== Check Large System Extensions (LSE)
571+
// RUN: %clang -target aarch64-none-linux-gnu -march=armv8-a+lse -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-LSE %s
572+
// RUN: %clang -target arm64-none-linux-gnu -march=armv8-a+lse -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-LSE %s
573+
// RUN: %clang -target aarch64-none-linux-gnu -march=armv8.1-a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-LSE %s
574+
// RUN: %clang -target arm64-none-linux-gnu -march=armv8.1-a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-LSE %s
575+
// CHECK-LSE: __ARM_FEATURE_ATOMICS 1
576+
577+
// ================== Check Armv8.8-A/Armv9.3-A memcpy and memset acceleration instructions (MOPS)
578+
// RUN: %clang -target aarch64-none-elf -march=armv8.7-a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-NOMOPS %s
579+
// RUN: %clang -target aarch64-none-elf -march=armv8.7-a+mops -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-MOPS %s
580+
// RUN: %clang -target aarch64-none-elf -march=armv8.8-a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-MOPS %s
581+
// RUN: %clang -target aarch64-none-elf -march=armv8.8-a+nomops -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-NOMOPS %s
582+
// RUN: %clang -target aarch64-none-elf -march=armv8.8-a+nomops+mops -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-MOPS %s
583+
// RUN: %clang -target aarch64-none-elf -march=armv8.8-a+mops -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-MOPS %s
584+
// RUN: %clang -target aarch64-none-elf -march=armv8.8-a+mops+nomops -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-NOMOPS %s
585+
// RUN: %clang -target aarch64-none-elf -march=armv9.2-a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-NOMOPS %s
586+
// RUN: %clang -target aarch64-none-elf -march=armv9.2-a+mops -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-MOPS %s
587+
// RUN: %clang -target aarch64-none-elf -march=armv9.3-a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-MOPS %s
588+
// RUN: %clang -target aarch64-none-elf -march=armv9.3-a+nomops -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-NOMOPS %s
589+
// RUN: %clang -target aarch64-none-elf -march=armv9.3-a+mops -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-MOPS %s
590+
// Check that -target-feature -v9.3a doesn't enable dependant features
591+
// RUN: %clang -target aarch64-none-elf -Xclang -target-feature -Xclang -v9.3a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-NOMOPS %s
539592
// CHECK-MOPS: __ARM_FEATURE_MOPS 1
540593
// CHECK-NOMOPS-NOT: __ARM_FEATURE_MOPS 1
594+
541595
// ================== Check Armv8.9-A/Armv9.4-A 128-bit System Registers (FEAT_SYSREG128)
542596
// RUN: %clang -target aarch64-none-elf -march=armv8.9-a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-NOSYS128 %s
543597
// RUN: %clang -target aarch64-none-elf -march=armv9.4-a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-NOSYS128 %s

0 commit comments

Comments
 (0)