Stop using a clang builtin for Neon vmull_lane intrinsic.

llvm-svn: 121189
This commit is contained in:
Bob Wilson 2010-12-07 22:03:46 +00:00
parent 160fdf49e4
commit 7f3c0aa96f
2 changed files with 6 additions and 22 deletions

View File

@ -26,6 +26,7 @@ def OP_MULL_N: Op;
def OP_MLA_N : Op;
def OP_MLS_N : Op;
def OP_MUL_LN: Op;
def OP_MULL_LN : Op;
def OP_MLA_LN: Op;
def OP_MLS_LN: Op;
def OP_EQ : Op;
@ -312,7 +313,7 @@ def VQDMLSL_LANE : SInst<"vqdmlsl_lane", "wwddi", "si">;
def VMUL_N : Inst<"vmul_n", "dds", "sifUsUiQsQiQfQUsQUi", OP_MUL_N>;
def VMUL_LANE : Inst<"vmul_lane", "dddi", "sifUsUiQsQiQfQUsQUi", OP_MUL_LN>;
def VMULL_N : Inst<"vmull_n", "wda", "siUsUi", OP_MULL_N>;
def VMULL_LANE : SInst<"vmull_lane", "wddi", "siUsUi">;
def VMULL_LANE : Inst<"vmull_lane", "wddi", "siUsUi", OP_MULL_LN>;
def VQDMULL_N : SInst<"vqdmull_n", "wda", "si">;
def VQDMULL_LANE : SInst<"vqdmull_lane", "wddi", "si">;
def VQDMULH_N : SInst<"vqdmulh_n", "dda", "siQsQi">;

View File

@ -1541,27 +1541,10 @@ Value *CodeGenFunction::EmitARMBuiltinExpr(unsigned BuiltinID,
assert(poly && "vmul builtin only supported for polynomial types");
return EmitNeonCall(CGM.getIntrinsic(Intrinsic::arm_neon_vmulp, &Ty, 1),
Ops, "vmul");
case ARM::BI__builtin_neon_vmull_lane_v: {
const llvm::Type *DTy =llvm::VectorType::getTruncatedElementVectorType(VTy);
Ops[1] = Builder.CreateBitCast(Ops[1], DTy);
Ops[1] = EmitNeonSplat(Ops[1], cast<Constant>(Ops[2]));
}
case ARM::BI__builtin_neon_vmull_v: {
if (poly)
return EmitNeonCall(CGM.getIntrinsic(Intrinsic::arm_neon_vmullp, &Ty, 1),
Ops, "vmull");
const llvm::Type *DTy =llvm::VectorType::getTruncatedElementVectorType(VTy);
Ops[0] = Builder.CreateBitCast(Ops[0], DTy);
Ops[1] = Builder.CreateBitCast(Ops[1], DTy);
if (usgn) {
Ops[0] = Builder.CreateZExt(Ops[0], Ty);
Ops[1] = Builder.CreateZExt(Ops[1], Ty);
} else {
Ops[0] = Builder.CreateSExt(Ops[0], Ty);
Ops[1] = Builder.CreateSExt(Ops[1], Ty);
}
return Builder.CreateMul(Ops[0], Ops[1], "vmull");
}
case ARM::BI__builtin_neon_vmull_v:
assert(poly && "vmull builtin only supported for polynomial types");
return EmitNeonCall(CGM.getIntrinsic(Intrinsic::arm_neon_vmullp, &Ty, 1),
Ops, "vmull");
case ARM::BI__builtin_neon_vpadal_v:
case ARM::BI__builtin_neon_vpadalq_v:
Int = usgn ? Intrinsic::arm_neon_vpadalu : Intrinsic::arm_neon_vpadals;