From d8cc908d459846e11ee1caaa16bd4d07d8b44480 Mon Sep 17 00:00:00 2001 From: Sander de Smalen Date: Tue, 30 Jul 2019 10:14:39 +0000 Subject: [PATCH] [AArch64] Disable __ARM_FEATURE_SVE without ACLE. The Arm C Language Extensions for SVE document specifies that __ARM_FEATURE_SVE should be set when the compiler supports SVE and implements all the extensions described in the document. This is currently not yet the case, so the feature should be disabled until the compiler can provide all the extensions as described. Reviewers: c-rhodes, rengolin, rovka, ktkachov Reviewed By: rengolin Differential Revision: https://reviews.llvm.org/D65404 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@367301 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Basic/Targets/AArch64.cpp | 3 --- test/Preprocessor/aarch64-target-features.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/Basic/Targets/AArch64.cpp b/lib/Basic/Targets/AArch64.cpp index bde23ffbbc..25f2b7b35f 100644 --- a/lib/Basic/Targets/AArch64.cpp +++ b/lib/Basic/Targets/AArch64.cpp @@ -196,9 +196,6 @@ void AArch64TargetInfo::getTargetDefines(const LangOptions &Opts, Builder.defineMacro("__ARM_NEON_FP", "0xE"); } - if (FPU & SveMode) - Builder.defineMacro("__ARM_FEATURE_SVE", "1"); - if (HasCRC) Builder.defineMacro("__ARM_FEATURE_CRC32", "1"); diff --git a/test/Preprocessor/aarch64-target-features.c b/test/Preprocessor/aarch64-target-features.c index 6964edc96f..922c0997d5 100644 --- a/test/Preprocessor/aarch64-target-features.c +++ b/test/Preprocessor/aarch64-target-features.c @@ -88,7 +88,7 @@ // RUN: %clang -target aarch64 -mtune=cyclone -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MTUNE-CYCLONE %s // 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-NOT: __ARM_FEATURE_SVE 1 // RUN: %clang -target aarch64-none-linux-gnu -march=armv8.2a+dotprod -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-DOTPROD %s // CHECK-DOTPROD: __ARM_FEATURE_DOTPROD 1 -- 2.40.0