From: James Molloy Date: Wed, 16 Apr 2014 15:33:48 +0000 (+0000) Subject: [ARM64] Allow the disabling of NEON and crypto instructions. Update tests to pass... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=75ed3f354f13fed0e2cd261a7ebeaf2bbafdf3f2;p=clang [ARM64] Allow the disabling of NEON and crypto instructions. Update tests to pass -target-feature +neon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206394 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 745cc38979..2cf90701ed 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -4482,6 +4482,14 @@ class ARM64TargetInfo : public TargetInfo { static const TargetInfo::GCCRegAlias GCCRegAliases[]; static const char *const GCCRegNames[]; + enum FPUModeEnum { + FPUMode, + NeonMode + }; + + unsigned FPU; + unsigned Crypto; + static const Builtin::Info BuiltinInfo[]; std::string ABI; @@ -4502,11 +4510,6 @@ public: LongDoubleWidth = LongDoubleAlign = 128; LongDoubleFormat = &llvm::APFloat::IEEEquad; - if (Triple.isOSBinFormatMachO()) - DescriptionString = "e-m:o-i64:64-i128:128-n32:64-S128"; - else - DescriptionString = "e-m:e-i64:64-i128:128-n32:64-S128"; - // {} in inline assembly are neon specifiers, not assembly variant // specifiers. NoAsmVariants = true; @@ -4575,15 +4578,14 @@ public: Builder.defineMacro("__ARM_SIZEOF_MINIMAL_ENUM", Opts.ShortEnums ? "1" : "4"); - // FIXME: the target should support NEON as an optional extension, like - // the OSS AArch64. - Builder.defineMacro("__ARM_NEON"); - // 64-bit NEON supports half, single and double precision operations. - Builder.defineMacro("__ARM_NEON_FP", "7"); + if (FPU == NeonMode) { + Builder.defineMacro("__ARM_NEON"); + // 64-bit NEON supports half, single and double precision operations. + Builder.defineMacro("__ARM_NEON_FP", "7"); + } - // FIXME: the target should support crypto as an optional extension, like - // the OSS AArch64 - Builder.defineMacro("__ARM_FEATURE_CRYPTO"); + if (Crypto) + Builder.defineMacro("__ARM_FEATURE_CRYPTO"); } virtual void getTargetBuiltins(const Builtin::Info *&Records, @@ -4593,15 +4595,22 @@ public: } virtual bool hasFeature(StringRef Feature) const { - return llvm::StringSwitch(Feature) - .Case("arm64", true) - .Case("aarch64", true) - .Case("neon", true) - .Default(false); + return Feature == "aarch64" || + Feature == "arm64" || + (Feature == "neon" && FPU == NeonMode); } bool handleTargetFeatures(std::vector &Features, DiagnosticsEngine &Diags) override { + FPU = FPUMode; + Crypto = 0; + for (unsigned i = 0, e = Features.size(); i != e; ++i) { + if (Features[i] == "+neon") + FPU = NeonMode; + if (Features[i] == "+crypto") + Crypto = 1; + } + setDescriptionString(); return true; diff --git a/test/CodeGen/aarch64-neon-2velem.c b/test/CodeGen/aarch64-neon-2velem.c index 19c9b16adc..c00c8bb40f 100644 --- a/test/CodeGen/aarch64-neon-2velem.c +++ b/test/CodeGen/aarch64-neon-2velem.c @@ -4,7 +4,7 @@ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \ // RUN: -S -O3 -o - %s | FileCheck %s -// RUN: %clang_cc1 -triple arm64-none-linux-gnu -S -O3 -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -S -O3 -o - %s | FileCheck %s // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-3v.c b/test/CodeGen/aarch64-neon-3v.c index 5251690c18..5c51c09605 100644 --- a/test/CodeGen/aarch64-neon-3v.c +++ b/test/CodeGen/aarch64-neon-3v.c @@ -2,7 +2,7 @@ // REQUIRES: arm64-registered-target // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \ // RUN: -S -O3 -o - %s | FileCheck %s -// RUN: %clang_cc1 -triple arm64-none-linux-gnu -S -O3 -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -S -O3 -o - %s | FileCheck %s // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-across.c b/test/CodeGen/aarch64-neon-across.c index 17ac3efb85..330869ec89 100644 --- a/test/CodeGen/aarch64-neon-across.c +++ b/test/CodeGen/aarch64-neon-across.c @@ -2,7 +2,7 @@ // REQUIRES: arm64-registered-target // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s -// RUN: %clang_cc1 -triple arm64-none-linux-gnu \ +// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-extract.c b/test/CodeGen/aarch64-neon-extract.c index 77d574cf0e..b8da2b842e 100644 --- a/test/CodeGen/aarch64-neon-extract.c +++ b/test/CodeGen/aarch64-neon-extract.c @@ -2,7 +2,7 @@ // REQUIRES: arm64-registered-target // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s -// RUN: %clang_cc1 -triple arm64-none-linux-gnu \ +// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-fcvt-intrinsics.c b/test/CodeGen/aarch64-neon-fcvt-intrinsics.c index 77022f58fe..c63ce8557d 100644 --- a/test/CodeGen/aarch64-neon-fcvt-intrinsics.c +++ b/test/CodeGen/aarch64-neon-fcvt-intrinsics.c @@ -2,7 +2,7 @@ // REQUIRES: arm64-registered-target // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s -// RUN: %clang_cc1 -triple arm64-none-linux-gnu \ +// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-fma.c b/test/CodeGen/aarch64-neon-fma.c index 85603c5257..68f2fbc52a 100644 --- a/test/CodeGen/aarch64-neon-fma.c +++ b/test/CodeGen/aarch64-neon-fma.c @@ -4,7 +4,7 @@ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck -check-prefix=CHECK-FMA %s // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \ // RUN: -S -O3 -o - %s | FileCheck %s -// RUN: %clang_cc1 -triple arm64-none-linux-gnu -S -O3 -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -S -O3 -o - %s | FileCheck %s // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-intrinsics.c b/test/CodeGen/aarch64-neon-intrinsics.c index 4e8c40528e..9cff0bc027 100644 --- a/test/CodeGen/aarch64-neon-intrinsics.c +++ b/test/CodeGen/aarch64-neon-intrinsics.c @@ -2,7 +2,7 @@ // REQUIRES: arm64-registered-target // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-AARCH64 -// RUN: %clang_cc1 -triple arm64-none-linux-gnu \ +// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-ARM64 // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-ldst-one.c b/test/CodeGen/aarch64-neon-ldst-one.c index 2d63628e9b..c6e0f85e87 100644 --- a/test/CodeGen/aarch64-neon-ldst-one.c +++ b/test/CodeGen/aarch64-neon-ldst-one.c @@ -2,7 +2,7 @@ // REQUIRES: arm64-registered-target // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s -// RUN: %clang_cc1 -triple arm64-none-linux-gnu \ +// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s #include diff --git a/test/CodeGen/aarch64-neon-misc.c b/test/CodeGen/aarch64-neon-misc.c index dce00f3454..9a5569b63d 100644 --- a/test/CodeGen/aarch64-neon-misc.c +++ b/test/CodeGen/aarch64-neon-misc.c @@ -2,7 +2,7 @@ // REQUIRES: arm64-registered-target // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s -// RUN: %clang_cc1 -triple arm64-none-linux-gnu \ +// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-perm.c b/test/CodeGen/aarch64-neon-perm.c index c9a3d600dc..bcff83de36 100644 --- a/test/CodeGen/aarch64-neon-perm.c +++ b/test/CodeGen/aarch64-neon-perm.c @@ -2,7 +2,7 @@ // REQUIRES: arm64-registered-target // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s -// RUN: %clang_cc1 -triple arm64-none-linux-gnu \ +// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-scalar-copy.c b/test/CodeGen/aarch64-neon-scalar-copy.c index 227c6e04e1..806b626bff 100644 --- a/test/CodeGen/aarch64-neon-scalar-copy.c +++ b/test/CodeGen/aarch64-neon-scalar-copy.c @@ -2,7 +2,7 @@ // REQUIRES: arm64-registered-target // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s -// RUN: %clang_cc1 -triple arm64-none-linux-gnu \ +// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s diff --git a/test/CodeGen/aarch64-neon-scalar-x-indexed-elem.c b/test/CodeGen/aarch64-neon-scalar-x-indexed-elem.c index cbbdff8fc8..ac7a7520ee 100644 --- a/test/CodeGen/aarch64-neon-scalar-x-indexed-elem.c +++ b/test/CodeGen/aarch64-neon-scalar-x-indexed-elem.c @@ -2,7 +2,7 @@ // REQUIRES: arm64-registered-target // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s -// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-cpu cyclone \ +// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -target-cpu cyclone \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-shifts.c b/test/CodeGen/aarch64-neon-shifts.c index 99adff1f04..a6cb9be7c2 100644 --- a/test/CodeGen/aarch64-neon-shifts.c +++ b/test/CodeGen/aarch64-neon-shifts.c @@ -2,7 +2,7 @@ // REQUIRES: arm64-registered-target // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -emit-llvm -O1 -o - %s | FileCheck %s -// RUN: %clang_cc1 -triple arm64-none-linux-gnu \ +// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -emit-llvm -O1 -o - %s | FileCheck %s #include diff --git a/test/CodeGen/aarch64-neon-tbl.c b/test/CodeGen/aarch64-neon-tbl.c index 93cba1d7e1..682fade592 100644 --- a/test/CodeGen/aarch64-neon-tbl.c +++ b/test/CodeGen/aarch64-neon-tbl.c @@ -2,7 +2,7 @@ // REQUIRES: arm64-registered-target // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s -// RUN: %clang_cc1 -triple arm64-none-linux-gnu \ +// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-vcombine.c b/test/CodeGen/aarch64-neon-vcombine.c index 381b052849..78f422ec25 100644 --- a/test/CodeGen/aarch64-neon-vcombine.c +++ b/test/CodeGen/aarch64-neon-vcombine.c @@ -2,7 +2,7 @@ // REQUIRES: arm64-registered-target // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \ // RUN: -S -O3 -o - %s | FileCheck %s -// RUN: %clang_cc1 -triple arm64-none-linux-gnu -S -O3 -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -S -O3 -o - %s | FileCheck %s // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-vget-hilo.c b/test/CodeGen/aarch64-neon-vget-hilo.c index 4d80d414d3..96317ffd32 100644 --- a/test/CodeGen/aarch64-neon-vget-hilo.c +++ b/test/CodeGen/aarch64-neon-vget-hilo.c @@ -2,7 +2,7 @@ // REQUIRES: arm64-registered-target // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s --check-prefix CHECK-COMMON --check-prefix CHECK-AARCH64 -// RUN: %clang_cc1 -triple arm64-none-linux-gnu \ +// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s --check-prefix CHECK-COMMON --check-prefix CHECK-ARM64 // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-poly128.c b/test/CodeGen/aarch64-poly128.c index 609e5962ce..3a4d363a53 100644 --- a/test/CodeGen/aarch64-poly128.c +++ b/test/CodeGen/aarch64-poly128.c @@ -3,7 +3,7 @@ // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s --check-prefix=CHECK \ // RUN: --check-prefix=CHECK-AARCH64 -// RUN: %clang_cc1 -triple arm64-none-linux-gnu \ +// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s --check-prefix=CHECK \ // RUN: --check-prefix=CHECK-ARM64 diff --git a/test/CodeGen/aarch64-poly64.c b/test/CodeGen/aarch64-poly64.c index c071147af2..3f544c221e 100644 --- a/test/CodeGen/aarch64-poly64.c +++ b/test/CodeGen/aarch64-poly64.c @@ -3,7 +3,7 @@ // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s --check-prefix=CHECK \ // RUN: --check-prefix=CHECK-AARCH64 -// RUN: %clang_cc1 -triple arm64-none-linux-gnu \ +// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s --check-prefix=CHECK \ // RUN: --check-prefix=CHECK-ARM64 diff --git a/test/CodeGen/arm-aapcs-vfp.c b/test/CodeGen/arm-aapcs-vfp.c index cd9aaa4735..9972158bb9 100644 --- a/test/CodeGen/arm-aapcs-vfp.c +++ b/test/CodeGen/arm-aapcs-vfp.c @@ -12,7 +12,7 @@ // RUN: -ffreestanding \ // RUN: -emit-llvm -w -o - %s | FileCheck %s -// RUN: %clang_cc1 -triple arm64-apple-darwin9 \ +// RUN: %clang_cc1 -triple arm64-apple-darwin9 -target-feature +neon \ // RUN: -ffreestanding \ // RUN: -emit-llvm -w -o - %s | FileCheck -check-prefix=CHECK64 %s diff --git a/test/CodeGen/arm64-arguments.c b/test/CodeGen/arm64-arguments.c index edfb62832a..c5e489fd85 100644 --- a/test/CodeGen/arm64-arguments.c +++ b/test/CodeGen/arm64-arguments.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-abi darwinpcs -ffreestanding -emit-llvm -w -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -target-abi darwinpcs -ffreestanding -emit-llvm -w -o - %s | FileCheck %s // CHECK: define signext i8 @f0() char f0(void) { diff --git a/test/CodeGen/arm64-lanes.c b/test/CodeGen/arm64-lanes.c index 63d7d0c831..b0d4694677 100644 --- a/test/CodeGen/arm64-lanes.c +++ b/test/CodeGen/arm64-lanes.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -O3 -triple arm64-apple-ios7 -ffreestanding -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -O3 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -emit-llvm -o - %s | FileCheck %s #include diff --git a/test/CodeGen/arm64-scalar-test.c b/test/CodeGen/arm64-scalar-test.c index 1e1087d40b..a2231be7ad 100644 --- a/test/CodeGen/arm64-scalar-test.c +++ b/test/CodeGen/arm64-scalar-test.c @@ -1,5 +1,5 @@ // REQUIRES: arm64-registered-target -// RUN: %clang_cc1 -triple arm64-apple-ios7.0 \ +// RUN: %clang_cc1 -triple arm64-apple-ios7.0 -target-feature +neon \ // RUN: -S -O1 -o - -ffreestanding %s | FileCheck %s // We're explicitly using arm_neon.h here: some types probably don't match diff --git a/test/CodeGen/arm64-vrnd.c b/test/CodeGen/arm64-vrnd.c index 4de2ec73ac..de72013629 100644 --- a/test/CodeGen/arm64-vrnd.c +++ b/test/CodeGen/arm64-vrnd.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple arm64-apple-ios7 -ffreestanding -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -emit-llvm -o - %s | FileCheck %s #include diff --git a/test/CodeGen/arm64-vrsqrt.c b/test/CodeGen/arm64-vrsqrt.c index 45a536ca28..90e012a994 100644 --- a/test/CodeGen/arm64-vrsqrt.c +++ b/test/CodeGen/arm64-vrsqrt.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple arm64-apple-ios7.0 -ffreestanding -emit-llvm -O1 -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple arm64-apple-ios7.0 -target-feature +neon -ffreestanding -emit-llvm -O1 -o - %s | FileCheck %s #include diff --git a/test/CodeGen/arm64_crypto.c b/test/CodeGen/arm64_crypto.c index 7150c56c8a..c672d2d0ed 100644 --- a/test/CodeGen/arm64_crypto.c +++ b/test/CodeGen/arm64_crypto.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple arm64-apple-ios7.0 -ffreestanding -Os -S -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple arm64-apple-ios7.0 -target-feature +neon -target-feature +crypto -ffreestanding -Os -S -o - %s | FileCheck %s // REQUIRES: arm64-registered-target #include diff --git a/test/CodeGen/arm64_neon_high_half.c b/test/CodeGen/arm64_neon_high_half.c index 920dded8d3..0cda5e19ea 100644 --- a/test/CodeGen/arm64_neon_high_half.c +++ b/test/CodeGen/arm64_neon_high_half.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple arm64-apple-ios7.0 -ffreestanding -Os -S -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple arm64-apple-ios7.0 -target-feature +neon -ffreestanding -Os -S -o - %s | FileCheck %s // REQUIRES: arm64-registered-target #include diff --git a/test/CodeGen/arm64_vCMP.c b/test/CodeGen/arm64_vCMP.c index 5fb1d7933a..7356d3c531 100644 --- a/test/CodeGen/arm64_vCMP.c +++ b/test/CodeGen/arm64_vCMP.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -ffreestanding -S -o - -emit-llvm %s | FileCheck %s +// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s // Test ARM64 SIMD fused multiply add intrinsics diff --git a/test/CodeGen/arm64_vLdStNum_lane.c b/test/CodeGen/arm64_vLdStNum_lane.c index e36cd823b3..d9b85b2c2b 100644 --- a/test/CodeGen/arm64_vLdStNum_lane.c +++ b/test/CodeGen/arm64_vLdStNum_lane.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -ffreestanding -S -o - -emit-llvm %s | FileCheck %s +// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s // Test ARM64 SIMD load and stores of an N-element structure intrinsics #include diff --git a/test/CodeGen/arm64_vMaxMin.c b/test/CodeGen/arm64_vMaxMin.c index d53c0bb63d..631df08a31 100644 --- a/test/CodeGen/arm64_vMaxMin.c +++ b/test/CodeGen/arm64_vMaxMin.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -ffreestanding -S -o - -emit-llvm %s | FileCheck %s -// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -ffreestanding -S -o - %s | FileCheck -check-prefix=CHECK-CODEGEN %s +// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s +// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - %s | FileCheck -check-prefix=CHECK-CODEGEN %s // REQUIRES: arm64-registered-target // Test ARM64 SIMD max/min intrinsics diff --git a/test/CodeGen/arm64_vadd.c b/test/CodeGen/arm64_vadd.c index 83fb3e7e79..94d248efd6 100644 --- a/test/CodeGen/arm64_vadd.c +++ b/test/CodeGen/arm64_vadd.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -ffreestanding -S -o - -emit-llvm %s | FileCheck %s +// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s // Test ARM64 SIMD add intrinsics #include diff --git a/test/CodeGen/arm64_vca.c b/test/CodeGen/arm64_vca.c index 0acbe45066..bfe07e817e 100644 --- a/test/CodeGen/arm64_vca.c +++ b/test/CodeGen/arm64_vca.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -ffreestanding -S -o - -emit-llvm %s | FileCheck %s +// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s // Test ARM64 vector compare absolute intrinsics #include diff --git a/test/CodeGen/arm64_vcopy.c b/test/CodeGen/arm64_vcopy.c index 7283909f49..990d4f658c 100644 --- a/test/CodeGen/arm64_vcopy.c +++ b/test/CodeGen/arm64_vcopy.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -ffreestanding -S -o - -emit-llvm %s | FileCheck %s +// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s // Test ARM64 SIMD copy vector element to vector element: vcopyq_lane* diff --git a/test/CodeGen/arm64_vcreate.c b/test/CodeGen/arm64_vcreate.c index ae1e431c6b..b124eaffeb 100644 --- a/test/CodeGen/arm64_vcreate.c +++ b/test/CodeGen/arm64_vcreate.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -ffreestanding -S -o - -emit-llvm %s | FileCheck %s +// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s // Test ARM64 SIMD vcreate intrinsics /*#include */ diff --git a/test/CodeGen/arm64_vcvtfp.c b/test/CodeGen/arm64_vcvtfp.c index a98a175a82..539c7d826c 100644 --- a/test/CodeGen/arm64_vcvtfp.c +++ b/test/CodeGen/arm64_vcvtfp.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -ffreestanding -S -o - -emit-llvm %s | FileCheck %s +// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s #include diff --git a/test/CodeGen/arm64_vdup.c b/test/CodeGen/arm64_vdup.c index 8476af2538..8419828b38 100644 --- a/test/CodeGen/arm64_vdup.c +++ b/test/CodeGen/arm64_vdup.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple arm64-apple-ios7 -ffreestanding -S -o - -emit-llvm %s | FileCheck %s +// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s // Test ARM64 SIMD duplicate lane and n intrinsics #include diff --git a/test/CodeGen/arm64_vdupq_n_f64.c b/test/CodeGen/arm64_vdupq_n_f64.c index 5e8834f6c4..73e1cc4bf9 100644 --- a/test/CodeGen/arm64_vdupq_n_f64.c +++ b/test/CodeGen/arm64_vdupq_n_f64.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -O3 -triple arm64-apple-ios7 -ffreestanding -S -o - %s | FileCheck %s -// RUN: %clang_cc1 -O3 -triple arm64-apple-ios7 -ffreestanding -S -o - -emit-llvm %s | \ +// RUN: %clang_cc1 -O3 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - %s | FileCheck %s +// RUN: %clang_cc1 -O3 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | \ // RUN: FileCheck -check-prefix=CHECK-IR %s // REQUIRES: arm64-registered-target diff --git a/test/CodeGen/arm64_vecCmpBr.c b/test/CodeGen/arm64_vecCmpBr.c index 779c6ef711..08fa6f7e7b 100644 --- a/test/CodeGen/arm64_vecCmpBr.c +++ b/test/CodeGen/arm64_vecCmpBr.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -O3 -triple arm64-apple-ios7 -S -ffreestanding %s -o - -target-cpu cyclone | FileCheck %s +// RUN: %clang_cc1 -O3 -triple arm64-apple-ios7 -target-feature +neon -S -ffreestanding %s -o - -target-cpu cyclone | FileCheck %s // REQUIRES: arm64-registered-target // test code generation for #include diff --git a/test/CodeGen/arm64_vext.c b/test/CodeGen/arm64_vext.c index 50ff48c3a1..6c3fe73399 100644 --- a/test/CodeGen/arm64_vext.c +++ b/test/CodeGen/arm64_vext.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple arm64-apple-ios7 -ffreestanding -S -o - -emit-llvm %s | FileCheck %s +// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s // Test ARM64 extract intrinsics // can use as back end test by adding a run line with diff --git a/test/CodeGen/arm64_vfma.c b/test/CodeGen/arm64_vfma.c index e57161b894..bfa5687796 100644 --- a/test/CodeGen/arm64_vfma.c +++ b/test/CodeGen/arm64_vfma.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -ffreestanding -S -o - -emit-llvm %s | FileCheck %s +// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s // Test ARM64 SIMD fused multiply add intrinsics #include diff --git a/test/CodeGen/arm64_vget.c b/test/CodeGen/arm64_vget.c index 44c7da504c..62b68ef343 100644 --- a/test/CodeGen/arm64_vget.c +++ b/test/CodeGen/arm64_vget.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -ffreestanding -S -o - -emit-llvm %s | FileCheck %s +// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s // Test ARM64 SIMD vget intrinsics #include diff --git a/test/CodeGen/arm64_vneg.c b/test/CodeGen/arm64_vneg.c index 96b9e1f539..74ea0eb02b 100644 --- a/test/CodeGen/arm64_vneg.c +++ b/test/CodeGen/arm64_vneg.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -ffreestanding -S -o - -emit-llvm %s | FileCheck %s +// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s // Test ARM64 SIMD negate and saturating negate intrinsics #include diff --git a/test/CodeGen/arm64_vqmov.c b/test/CodeGen/arm64_vqmov.c index e8c0605a75..38acc0c3b3 100644 --- a/test/CodeGen/arm64_vqmov.c +++ b/test/CodeGen/arm64_vqmov.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -O3 -triple arm64-apple-ios7 -ffreestanding -S -o - %s | FileCheck %s +// RUN: %clang_cc1 -O3 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - %s | FileCheck %s // REQUIRES: arm64-registered-target /// Test vqmov[u]n_high_{16,32,64) ARM64 intrinsics diff --git a/test/CodeGen/arm64_vrecps.c b/test/CodeGen/arm64_vrecps.c index 66f06ceb53..1febaa1852 100644 --- a/test/CodeGen/arm64_vrecps.c +++ b/test/CodeGen/arm64_vrecps.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -O3 -triple arm64-apple-ios7 -ffreestanding -S -o - %s | FileCheck %s +// RUN: %clang_cc1 -O3 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - %s | FileCheck %s // REQUIRES: arm64-registered-target /// Test vrecpss_f32, vrecpsd_f64 ARM64 intrinsics diff --git a/test/CodeGen/arm64_vset_lane.c b/test/CodeGen/arm64_vset_lane.c index 6997eb87cf..49f21514e8 100644 --- a/test/CodeGen/arm64_vset_lane.c +++ b/test/CodeGen/arm64_vset_lane.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -ffreestanding -S -o - -emit-llvm %s | FileCheck %s +// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s // Test ARM64 SIMD set lane intrinsics INCOMPLETE #include diff --git a/test/CodeGen/arm64_vshift.c b/test/CodeGen/arm64_vshift.c index cac4d12bd9..48255c27a6 100644 --- a/test/CodeGen/arm64_vshift.c +++ b/test/CodeGen/arm64_vshift.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple arm64-apple-ios7.0 -ffreestanding -emit-llvm -o - -O1 %s | FileCheck %s +// RUN: %clang_cc1 -triple arm64-apple-ios7.0 -target-feature +neon -ffreestanding -emit-llvm -o - -O1 %s | FileCheck %s #include int8x8_t test_vqshl_n_s8(int8x8_t in) { diff --git a/test/CodeGen/arm64_vsli.c b/test/CodeGen/arm64_vsli.c index bce14461d0..02432577d3 100644 --- a/test/CodeGen/arm64_vsli.c +++ b/test/CodeGen/arm64_vsli.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -ffreestanding -S -o - -emit-llvm %s | FileCheck %s -// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -ffreestanding -S -o - %s | \ +// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s +// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - %s | \ // RUN: FileCheck -check-prefix=CHECK_CODEGEN %s // REQUIRES: arm64-registered-target // Test diff --git a/test/CodeGen/arm64_vsri.c b/test/CodeGen/arm64_vsri.c index f5613398b3..2547df5c9a 100644 --- a/test/CodeGen/arm64_vsri.c +++ b/test/CodeGen/arm64_vsri.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -ffreestanding -S -o - -emit-llvm %s | FileCheck %s -// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -ffreestanding -S -o - %s | \ +// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s +// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - %s | \ // RUN: FileCheck -check-prefix=CHECK_CODEGEN %s // REQUIRES: arm64-registered-target diff --git a/test/CodeGen/arm64_vtst.c b/test/CodeGen/arm64_vtst.c index c30b3947c2..f40c62c4a3 100644 --- a/test/CodeGen/arm64_vtst.c +++ b/test/CodeGen/arm64_vtst.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -ffreestanding -S -o - -emit-llvm %s | FileCheck %s +// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s // Test ARM64 SIMD comparison test intrinsics #include diff --git a/test/CodeGenCXX/mangle-neon-vectors.cpp b/test/CodeGenCXX/mangle-neon-vectors.cpp index a9d0b8d83c..6faf6226ef 100644 --- a/test/CodeGenCXX/mangle-neon-vectors.cpp +++ b/test/CodeGenCXX/mangle-neon-vectors.cpp @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -triple armv7-apple-ios -target-feature +neon %s -emit-llvm -o - | FileCheck %s -// RUN: %clang_cc1 -triple arm64-apple-ios %s -emit-llvm -o - | FileCheck %s -// RUN: %clang_cc1 -triple arm64-linux-gnu %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-AARCH64 +// RUN: %clang_cc1 -triple arm64-apple-ios -target-feature +neon %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -triple arm64-linux-gnu -target-feature +neon %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-AARCH64 typedef float float32_t; typedef double float64_t; diff --git a/test/CodeGenCXX/poly-unsigned.cpp b/test/CodeGenCXX/poly-unsigned.cpp index 9851a06089..e2ab430a96 100644 --- a/test/CodeGenCXX/poly-unsigned.cpp +++ b/test/CodeGenCXX/poly-unsigned.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple arm64-apple-ios -ffreestanding -S -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-UNSIGNED-POLY %s -// RUN: %clang_cc1 -triple arm64-linux-gnu -ffreestanding -S -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-UNSIGNED-POLY %s +// RUN: %clang_cc1 -triple arm64-apple-ios -target-feature +neon -ffreestanding -S -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-UNSIGNED-POLY %s +// RUN: %clang_cc1 -triple arm64-linux-gnu -target-feature +neon -ffreestanding -S -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-UNSIGNED-POLY %s // RUN: %clang_cc1 -triple armv7-apple-ios -ffreestanding -target-cpu cortex-a8 -S -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-SIGNED-POLY %s #include diff --git a/test/Preprocessor/init.c b/test/Preprocessor/init.c index 4fc4bfa47d..8f57d298c3 100644 --- a/test/Preprocessor/init.c +++ b/test/Preprocessor/init.c @@ -213,7 +213,6 @@ // Other definitions vary from platform to platform // RUN: %clang_cc1 -E -dM -ffreestanding -triple=aarch64-none-none < /dev/null | FileCheck -check-prefix AARCH64 %s -// RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm64-none-none < /dev/null | FileCheck -check-prefix AARCH64 %s // // AARCH64:#define _LP64 1 // AARCH64-NOT:#define __AARCH64EB__ 1 @@ -316,7 +315,6 @@ // AARCH64:#define __aarch64__ 1 // // RUN: %clang_cc1 -E -dM -ffreestanding -triple=aarch64_be-none-none < /dev/null | FileCheck -check-prefix AARCH64-BE %s -// RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm64_be-none-none < /dev/null | FileCheck -check-prefix AARCH64-BE %s // // AARCH64-BE:#define _LP64 1 // AARCH64-BE:#define __AARCH64EB__ 1 diff --git a/test/Sema/arm64-neon-args.c b/test/Sema/arm64-neon-args.c index 5ee653ddd2..a36df030fb 100644 --- a/test/Sema/arm64-neon-args.c +++ b/test/Sema/arm64-neon-args.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple arm64-apple-darwin -fsyntax-only -ffreestanding -verify %s +// RUN: %clang_cc1 -triple arm64-apple-darwin -target-feature +neon -fsyntax-only -ffreestanding -verify %s #include