[clang] 59b419a - Revert "[Clang,Driver] Add -fveclib=Darwin_libsystem_m support."
Douglas Yung via cfe-commits
cfe-commits at lists.llvm.org
Fri May 14 22:41:34 PDT 2021
Author: Douglas Yung
Date: 2021-05-14T22:39:12-07:00
New Revision: 59b419adc6e608db8d7c31efcc37f34c0b57b7d0
URL: https://github.com/llvm/llvm-project/commit/59b419adc6e608db8d7c31efcc37f34c0b57b7d0
DIFF: https://github.com/llvm/llvm-project/commit/59b419adc6e608db8d7c31efcc37f34c0b57b7d0.diff
LOG: Revert "[Clang,Driver] Add -fveclib=Darwin_libsystem_m support."
This reverts commit 187a14e1f39942545b905679a8452365dfd87af8.
The test added in this commit is failing on several build bots:
https://lab.llvm.org/buildbot/#/builders/139/builds/4059
https://lab.llvm.org/buildbot/#/builders/132/builds/5605
Added:
Modified:
clang/include/clang/Basic/CodeGenOptions.h
clang/include/clang/Driver/Options.td
clang/lib/CodeGen/BackendUtil.cpp
clang/test/Driver/autocomplete.c
clang/test/Driver/fveclib.c
Removed:
clang/test/CodeGen/veclib-darwin-libsystem-m.c
################################################################################
diff --git a/clang/include/clang/Basic/CodeGenOptions.h b/clang/include/clang/Basic/CodeGenOptions.h
index 65688217878ed..3f06dd3a3f821 100644
--- a/clang/include/clang/Basic/CodeGenOptions.h
+++ b/clang/include/clang/Basic/CodeGenOptions.h
@@ -55,12 +55,11 @@ class CodeGenOptions : public CodeGenOptionsBase {
};
enum VectorLibrary {
- NoLibrary, // Don't use any vector library.
- Accelerate, // Use the Accelerate framework.
- LIBMVEC, // GLIBC vector math library.
- MASSV, // IBM MASS vector library.
- SVML, // Intel short vector math library.
- Darwin_libsystem_m // Use Darwin's libsytem_m vector functions.
+ NoLibrary, // Don't use any vector library.
+ Accelerate, // Use the Accelerate framework.
+ LIBMVEC, // GLIBC vector math library.
+ MASSV, // IBM MASS vector library.
+ SVML // Intel short vector math library.
};
enum ObjCDispatchMethodKind {
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index d888467f536ab..a7adab50657af 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -2171,10 +2171,9 @@ def fno_experimental_isel : Flag<["-"], "fno-experimental-isel">, Group<f_clang_
Alias<fno_global_isel>;
def fveclib : Joined<["-"], "fveclib=">, Group<f_Group>, Flags<[CC1Option]>,
HelpText<"Use the given vector functions library">,
- Values<"Accelerate,libmvec,MASSV,SVML,Darwin_libsystem_m,none">,
+ Values<"Accelerate,libmvec,MASSV,SVML,none">,
NormalizedValuesScope<"CodeGenOptions">,
- NormalizedValues<["Accelerate", "LIBMVEC", "MASSV", "SVML",
- "Darwin_libsystem_m", "NoLibrary"]>,
+ NormalizedValues<["Accelerate", "LIBMVEC", "MASSV", "SVML", "NoLibrary"]>,
MarshallingInfoEnum<CodeGenOpts<"VecLib">, "NoLibrary">;
def fno_lax_vector_conversions : Flag<["-"], "fno-lax-vector-conversions">, Group<f_Group>,
Alias<flax_vector_conversions_EQ>, AliasArgs<["none"]>;
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index fef9d9dcdc90d..e2799f6aba4ca 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -402,10 +402,6 @@ static TargetLibraryInfoImpl *createTLII(llvm::Triple &TargetTriple,
case CodeGenOptions::SVML:
TLII->addVectorizableFunctionsFromVecLib(TargetLibraryInfoImpl::SVML);
break;
- case CodeGenOptions::Darwin_libsystem_m:
- TLII->addVectorizableFunctionsFromVecLib(
- TargetLibraryInfoImpl::DarwinLibSystemM);
- break;
default:
break;
}
diff --git a/clang/test/CodeGen/veclib-darwin-libsystem-m.c b/clang/test/CodeGen/veclib-darwin-libsystem-m.c
deleted file mode 100644
index cb1f66e22d4a1..0000000000000
--- a/clang/test/CodeGen/veclib-darwin-libsystem-m.c
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %clang_cc1 -fveclib=Darwin_libsystem_m -triple arm64-apple-darwin %s -target-cpu apple-a7 -vectorize-loops -emit-llvm -O3 -o - | FileCheck %s
-
-// Make sure -fveclib=Darwin_libsystem_m gets passed through to LLVM as
-// expected: a call to _simd_sin_f4 should be generated.
-
-extern float sinf(float);
-
-// CHECK-LABEL: define{{.*}}@apply_sin
-// CHECK: call <4 x float> @_simd_sin_f4(
-//
-void apply_sin(float *A, float *B, float *C, unsigned N) {
- for (unsigned i = 0; i < N; i++)
- C[i] = sinf(A[i]) + sinf(B[i]);
-}
diff --git a/clang/test/Driver/autocomplete.c b/clang/test/Driver/autocomplete.c
index 3efe141de6fc1..85bf6c7912a45 100644
--- a/clang/test/Driver/autocomplete.c
+++ b/clang/test/Driver/autocomplete.c
@@ -76,7 +76,6 @@
// FLTOALL-NEXT: thin
// RUN: %clang --autocomplete=-fveclib= | FileCheck %s -check-prefix=FVECLIBALL
// FVECLIBALL: Accelerate
-// FVECLIBALL-NEXT: Darwin_libsystem_m
// FVECLIBALL-NEXT: libmvec
// FVECLIBALL-NEXT: MASSV
// FVECLIBALL-NEXT: none
diff --git a/clang/test/Driver/fveclib.c b/clang/test/Driver/fveclib.c
index 2bf7558a02af8..5036422f57913 100644
--- a/clang/test/Driver/fveclib.c
+++ b/clang/test/Driver/fveclib.c
@@ -2,14 +2,12 @@
// RUN: %clang -### -c -fveclib=Accelerate %s 2>&1 | FileCheck -check-prefix CHECK-ACCELERATE %s
// RUN: %clang -### -c -fveclib=libmvec %s 2>&1 | FileCheck -check-prefix CHECK-libmvec %s
// RUN: %clang -### -c -fveclib=MASSV %s 2>&1 | FileCheck -check-prefix CHECK-MASSV %s
-// RUN: %clang -### -c -fveclib=Darwin_libsystem_m %s 2>&1 | FileCheck -check-prefix CHECK-DARWIN_LIBSYSTEM_M %s
// RUN: not %clang -c -fveclib=something %s 2>&1 | FileCheck -check-prefix CHECK-INVALID %s
// CHECK-NOLIB: "-fveclib=none"
// CHECK-ACCELERATE: "-fveclib=Accelerate"
// CHECK-libmvec: "-fveclib=libmvec"
// CHECK-MASSV: "-fveclib=MASSV"
-// CHECK-DARWIN_LIBSYSTEM_M: "-fveclib=Darwin_libsystem_m"
// CHECK-INVALID: error: invalid value 'something' in '-fveclib=something'
More information about the cfe-commits
mailing list