diff options
author | Eric Christopher <echristo@gmail.com> | 2019-12-09 16:47:38 -0800 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2019-12-09 16:47:38 -0800 |
commit | 9c6b7f68b807250e7c3aa01938339fdbd239c4ea (patch) | |
tree | 37f7dfb0d02cd625f51ae51dce61894dbbb57047 /clang/lib | |
parent | 9803178a78c1858b0ac868c2cdf402cec5a10db9 (diff) | |
download | bcm5719-llvm-9c6b7f68b807250e7c3aa01938339fdbd239c4ea.tar.gz bcm5719-llvm-9c6b7f68b807250e7c3aa01938339fdbd239c4ea.zip |
Revert "[ARM][MVE] Add intrinsics for immediate shifts."
and two follow-on commits: one warning fix and one functionality.
As it's breaking at least the lto bot:
http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/15132/steps/test-stage1-compiler/logs/stdio
This reverts commits:
8d70f3c933a5b81a87a5ab1af0e3e98ee2cd7c67
ff4dceef9201c5ae3924e92f6955977f243ac71d
d97b3e3e65cd77a81b39732af84a1a4229e95091
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/CodeGen/CGBuiltin.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index 890019ac51c..7447a584159 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -6802,14 +6802,6 @@ Value *CodeGenFunction::EmitARMBuiltinExpr(unsigned BuiltinID, } } -template<typename Integer> -static Integer GetIntegerConstantValue(const Expr *E, ASTContext &Context) { - llvm::APSInt IntVal; - assert(E->isIntegerConstantExpr(IntVal, Context) && - "Sema should have checked this was a constant"); - return IntVal.getExtValue(); -} - static llvm::Value *SignOrZeroExtend(CGBuilderTy &Builder, llvm::Value *V, llvm::Type *T, bool Unsigned) { // Helper function called by Tablegen-constructed ARM MVE builtin codegen, @@ -6817,27 +6809,6 @@ static llvm::Value *SignOrZeroExtend(CGBuilderTy &Builder, llvm::Value *V, return Unsigned ? Builder.CreateZExt(V, T) : Builder.CreateSExt(V, T); } -static llvm::Value *MVEImmediateShr(CGBuilderTy &Builder, llvm::Value *V, - uint32_t Shift, bool Unsigned) { - // MVE helper function for integer shift right. This must handle signed vs - // unsigned, and also deal specially with the case where the shift count is - // equal to the lane size. In LLVM IR, an LShr with that parameter would be - // undefined behavior, but in MVE it's legal, so we must convert it to code - // that is not undefined in IR. - unsigned LaneBits = - V->getType()->getVectorElementType()->getPrimitiveSizeInBits(); - if (Shift == LaneBits) { - // An unsigned shift of the full lane size always generates zero, so we can - // simply emit a zero vector. A signed shift of the full lane size does the - // same thing as shifting by one bit fewer. - if (Unsigned) - return llvm::Constant::getNullValue(V->getType()); - else - --Shift; - } - return Unsigned ? Builder.CreateLShr(V, Shift) : Builder.CreateAShr(V, Shift); -} - static llvm::Value *ARMMVEVectorSplat(CGBuilderTy &Builder, llvm::Value *V) { // MVE-specific helper function for a vector splat, which infers the element // count of the output vector by knowing that MVE vectors are all 128 bits |