]> granicus.if.org Git - clang/commitdiff
ARM: comment on why vmull intrinsic has to exist for now.
authorTim Northover <tnorthover@apple.com>
Wed, 28 Aug 2013 09:46:40 +0000 (09:46 +0000)
committerTim Northover <tnorthover@apple.com>
Wed, 28 Aug 2013 09:46:40 +0000 (09:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189464 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGBuiltin.cpp

index 59b25d689f10a52dbc342bd57b5c1a73ceaf8372..febde9a322ab11c17e555353840c53a5a2baff92 100644 (file)
@@ -2523,6 +2523,11 @@ Value *CodeGenFunction::EmitARMBuiltinExpr(unsigned BuiltinID,
     return EmitNeonCall(CGM.getIntrinsic(Intrinsic::arm_neon_vmulp, Ty),
                         Ops, "vmul");
   case ARM::BI__builtin_neon_vmull_v:
+    // FIXME: the integer vmull operations could be emitted in terms of pure
+    // LLVM IR (2 exts followed by a mul). Unfortunately LLVM has a habit of
+    // hoisting the exts outside loops. Until global ISel comes along that can
+    // see through such movement this leads to bad CodeGen. So we need an
+    // intrinsic for now.
     Int = usgn ? Intrinsic::arm_neon_vmullu : Intrinsic::arm_neon_vmulls;
     Int = Type.isPoly() ? (unsigned)Intrinsic::arm_neon_vmullp : Int;
     return EmitNeonCall(CGM.getIntrinsic(Int, Ty), Ops, "vmull");