r247117 - Fix vld1_lane intrinsic generation
Steven Wu via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 8 18:37:18 PDT 2015
Author: steven_wu
Date: Tue Sep 8 20:37:18 2015
New Revision: 247117
URL: http://llvm.org/viewvc/llvm-project?rev=247117&view=rev
Log:
Fix vld1_lane intrinsic generation
Fix a bug introduced in r246985 which causes assertion when generating
vld1_lane.
Modified:
cfe/trunk/lib/CodeGen/CGBuiltin.cpp
Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=247117&r1=247116&r2=247117&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Tue Sep 8 20:37:18 2015
@@ -3770,8 +3770,7 @@ Value *CodeGenFunction::EmitARMBuiltinEx
// fall through
case NEON::BI__builtin_neon_vld1_lane_v: {
Ops[1] = Builder.CreateBitCast(Ops[1], Ty);
- Ty = llvm::PointerType::getUnqual(VTy->getElementType());
- Ops[0] = Builder.CreateBitCast(Ops[0], Ty);
+ PtrOp0 = Builder.CreateElementBitCast(PtrOp0, VTy->getElementType());
Value *Ld = Builder.CreateLoad(PtrOp0);
return Builder.CreateInsertElement(Ops[1], Ld, Ops[2], "vld1_lane");
}
More information about the cfe-commits
mailing list