From b6cd35729cd0372420dd3fad9adcd1314ea53cf8 Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Tue, 24 Jun 2014 12:07:44 +0000 Subject: [PATCH] ARM: remove dead CodeGen functions. These two are no longer being used by NEON codegen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211586 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGBuiltin.cpp | 30 ------------------------------ lib/CodeGen/CodeGenFunction.h | 3 --- 2 files changed, 33 deletions(-) diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp index a177fd71c7..608e9d9a16 100644 --- a/lib/CodeGen/CGBuiltin.cpp +++ b/lib/CodeGen/CGBuiltin.cpp @@ -1786,36 +1786,6 @@ Value *CodeGenFunction::EmitNeonRShiftImm(Value *Vec, Value *Shift, return Builder.CreateAShr(Vec, Shift, name); } -Value *CodeGenFunction::EmitConcatVectors(Value *Lo, Value *Hi, - llvm::Type *ArgTy) { - unsigned NumElts = ArgTy->getVectorNumElements(); - SmallVector Indices; - for (unsigned i = 0; i < 2 * NumElts; ++i) - Indices.push_back(ConstantInt::get(Int32Ty, i)); - - Constant *Mask = ConstantVector::get(Indices); - Value *LoCast = Builder.CreateBitCast(Lo, ArgTy); - Value *HiCast = Builder.CreateBitCast(Hi, ArgTy); - return Builder.CreateShuffleVector(LoCast, HiCast, Mask, "concat"); -} - -Value *CodeGenFunction::EmitExtractHigh(Value *Vec, llvm::Type *ResTy) { - unsigned NumElts = ResTy->getVectorNumElements(); - SmallVector Indices; - - llvm::Type *InTy = llvm::VectorType::get(ResTy->getVectorElementType(), - NumElts * 2); - Value *VecCast = Builder.CreateBitCast(Vec, InTy); - - // extract_high is a shuffle on the second half of the input indices: E.g. 4, - // 5, 6, 7 if we're extracting <4 x i16> from <8 x i16>. - for (unsigned i = 0; i < NumElts; ++i) - Indices.push_back(ConstantInt::get(Int32Ty, NumElts + i)); - - Constant *Mask = ConstantVector::get(Indices); - return Builder.CreateShuffleVector(VecCast, VecCast, Mask, "concat"); -} - /// GetPointeeAlignment - Given an expression with a pointer type, find the /// alignment of the type referenced by the pointer. Skip over implicit /// casts. diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index a222f646c6..1ce89642ff 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -2234,9 +2234,6 @@ public: bool negateForRightShift); llvm::Value *EmitNeonRShiftImm(llvm::Value *Vec, llvm::Value *Amt, llvm::Type *Ty, bool usgn, const char *name); - llvm::Value *EmitConcatVectors(llvm::Value *Lo, llvm::Value *Hi, - llvm::Type *ArgTy); - llvm::Value *EmitExtractHigh(llvm::Value *In, llvm::Type *ResTy); // Helper functions for EmitAArch64BuiltinExpr. llvm::Value *vectorWrapScalar8(llvm::Value *Op); llvm::Value *vectorWrapScalar16(llvm::Value *Op); -- 2.40.0