forked from OSchip/llvm-project
[clang][AArch64][SVE] Change SVE_VECTOR_OPERATORS macro for VLA vectors
The __ARM_FEATURE_SVE_VECTOR_OPERATORS macro should be changed to indicate that this feature is now supported on VLA vectors as well as VLS vectors. There is a complementary PR to the ACLE spec here https://github.com/ARM-software/acle/pull/213 Reviewed By: peterwaller-arm Differential Revision: https://reviews.llvm.org/D131573
This commit is contained in:
parent
bbb30bd54a
commit
13a784f368
|
@ -489,9 +489,12 @@ void AArch64TargetInfo::getTargetDefines(const LangOptions &Opts,
|
|||
Builder.defineMacro("__FP_FAST_FMA", "1");
|
||||
Builder.defineMacro("__FP_FAST_FMAF", "1");
|
||||
|
||||
// C/C++ operators work on both VLS and VLA SVE types
|
||||
if (FPU & SveMode)
|
||||
Builder.defineMacro("__ARM_FEATURE_SVE_VECTOR_OPERATORS", "2");
|
||||
|
||||
if (Opts.VScaleMin && Opts.VScaleMin == Opts.VScaleMax) {
|
||||
Builder.defineMacro("__ARM_FEATURE_SVE_BITS", Twine(Opts.VScaleMin * 128));
|
||||
Builder.defineMacro("__ARM_FEATURE_SVE_VECTOR_OPERATORS");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -150,6 +150,7 @@
|
|||
|
||||
// RUN: %clang -target aarch64-none-linux-gnu -march=armv8-a+sve -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-SVE %s
|
||||
// CHECK-SVE: __ARM_FEATURE_SVE 1
|
||||
// CHECK-SVE: __ARM_FEATURE_SVE_VECTOR_OPERATORS 2
|
||||
|
||||
// RUN: %clang -target aarch64-none-linux-gnu -march=armv8-a+sve+bf16 -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-SVE-BF16 %s
|
||||
// CHECK-SVE-BF16: __ARM_FEATURE_BF16_SCALAR_ARITHMETIC 1
|
||||
|
@ -512,9 +513,7 @@
|
|||
// RUN: %clang -target aarch64-arm-none-eabi -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
|
||||
// RUN: %clang -target aarch64-arm-none-eabi -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
|
||||
// CHECK-SVE-VECTOR-BITS: __ARM_FEATURE_SVE_BITS [[#VBITS:]]
|
||||
// CHECK-SVE-VECTOR-BITS: __ARM_FEATURE_SVE_VECTOR_OPERATORS 1
|
||||
// CHECK-NO-SVE-VECTOR-BITS-NOT: __ARM_FEATURE_SVE_BITS
|
||||
// CHECK-NO-SVE-VECTOR-BITS-NOT: __ARM_FEATURE_SVE_VECTOR_OPERATORS
|
||||
|
||||
// ================== Check Large System Extensions (LSE)
|
||||
// RUN: %clang -target aarch64-none-linux-gnu -march=armv8-a+lse -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-LSE %s
|
||||
|
|
Loading…
Reference in New Issue