[PATCH] D123006: [AArch64] Teach the costmodel about widening muls

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 4 04:30:34 PDT 2022


dmgreen added a comment.

Thanks.



================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:1292
   //
-  // TODO: Add additional widening operations (e.g., mul, shl, etc.) once we
+  // TODO: Add additional widening operations (e.g., shl, etc.) once we
   //       verify that their extending operands are eliminated during code
----------------
SjoerdMeijer wrote:
> While we are at it, look at shl in a follow up? :)
I'll see what I can do about this and any others. I think they are much rarer than mul, which can come up a fair amount.


================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:1856
   }
-  case ISD::MUL:
-    if (LT.second != MVT::v2i64)
-      return LT.first;
+  case ISD::MUL: {
     // Since we do not have a MUL.2d instruction, a mul <2 x i64> is expensive
----------------
SjoerdMeijer wrote:
> Nit: we don't need the brackets?
Oh yeah, I will remove it.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123006/new/

https://reviews.llvm.org/D123006



More information about the llvm-commits mailing list