From 2d33e423d5091b7d2cb8618952752abd55bba965 Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Thu, 31 Mar 2011 00:09:00 +0000 Subject: [PATCH] Use intrinsics for Neon vmull operations. Radar 9208957. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128590 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/arm_neon.td | 7 ++----- lib/CodeGen/CGBuiltin.cpp | 6 +++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/include/clang/Basic/arm_neon.td b/include/clang/Basic/arm_neon.td index 880a0da6bc..6d6c7c7bed 100644 --- a/include/clang/Basic/arm_neon.td +++ b/include/clang/Basic/arm_neon.td @@ -22,13 +22,11 @@ def OP_SUB : Op; def OP_SUBL : Op; def OP_SUBW : Op; def OP_MUL : Op; -def OP_MULL : Op; def OP_MLA : Op; def OP_MLAL : Op; def OP_MLS : Op; def OP_MLSL : Op; def OP_MUL_N : Op; -def OP_MULL_N: Op; def OP_MLA_N : Op; def OP_MLS_N : Op; def OP_MLAL_N : Op; @@ -144,8 +142,7 @@ def VQDMULH : SInst<"vqdmulh", "ddd", "siQsQi">; def VQRDMULH : SInst<"vqrdmulh", "ddd", "siQsQi">; def VQDMLAL : SInst<"vqdmlal", "wwdd", "si">; def VQDMLSL : SInst<"vqdmlsl", "wwdd", "si">; -def VMULL : Inst<"vmull", "wdd", "csiUcUsUi", OP_MULL>; -def VMULLP : SInst<"vmull", "wdd", "Pc">; +def VMULL : SInst<"vmull", "wdd", "csiUcUsUiPc">; def VQDMULL : SInst<"vqdmull", "wdd", "si">; //////////////////////////////////////////////////////////////////////////////// @@ -331,7 +328,7 @@ def VMLSL_LANE : Inst<"vmlsl_lane", "wwddi", "siUsUi", OP_MLSL_LN>; def VQDMLSL_LANE : Inst<"vqdmlsl_lane", "wwddi", "si", OP_QDMLSL_LN>; def VMUL_N : Inst<"vmul_n", "dds", "sifUsUiQsQiQfQUsQUi", OP_MUL_N>; def VMUL_LANE : Inst<"vmul_lane", "ddgi", "sifUsUiQsQiQfQUsQUi", OP_MUL_LN>; -def VMULL_N : Inst<"vmull_n", "wda", "siUsUi", OP_MULL_N>; +def VMULL_N : SInst<"vmull_n", "wda", "siUsUi">; def VMULL_LANE : Inst<"vmull_lane", "wddi", "siUsUi", OP_MULL_LN>; def VQDMULL_N : SInst<"vqdmull_n", "wda", "si">; def VQDMULL_LANE : Inst<"vqdmull_lane", "wddi", "si", OP_QDMULL_LN>; diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp index cc8a768263..8b72573ebc 100644 --- a/lib/CodeGen/CGBuiltin.cpp +++ b/lib/CodeGen/CGBuiltin.cpp @@ -1464,9 +1464,9 @@ Value *CodeGenFunction::EmitARMBuiltinExpr(unsigned BuiltinID, return EmitNeonCall(CGM.getIntrinsic(Intrinsic::arm_neon_vmulp, &Ty, 1), Ops, "vmul"); 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"); + Int = usgn ? Intrinsic::arm_neon_vmullu : Intrinsic::arm_neon_vmulls; + Int = poly ? Intrinsic::arm_neon_vmullp : Int; + return EmitNeonCall(CGM.getIntrinsic(Int, &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; -- 2.40.0