[cfe-commits] r128590 - in /cfe/trunk: include/clang/Basic/arm_neon.td lib/CodeGen/CGBuiltin.cpp

Bob Wilson bob.wilson at apple.com
Wed Mar 30 17:09:00 PDT 2011


Author: bwilson
Date: Wed Mar 30 19:09:00 2011
New Revision: 128590

URL: http://llvm.org/viewvc/llvm-project?rev=128590&view=rev
Log:
Use intrinsics for Neon vmull operations.  Radar 9208957.

Modified:
    cfe/trunk/include/clang/Basic/arm_neon.td
    cfe/trunk/lib/CodeGen/CGBuiltin.cpp

Modified: cfe/trunk/include/clang/Basic/arm_neon.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/arm_neon.td?rev=128590&r1=128589&r2=128590&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/arm_neon.td (original)
+++ cfe/trunk/include/clang/Basic/arm_neon.td Wed Mar 30 19:09:00 2011
@@ -22,13 +22,11 @@
 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 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 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>;

Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=128590&r1=128589&r2=128590&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Wed Mar 30 19:09:00 2011
@@ -1464,9 +1464,9 @@
     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;





More information about the cfe-commits mailing list