[llvm] [AArch64] Improve operand sinking for mul instructions (PR #116604)

David Green via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 25 01:36:13 PST 2024


================
@@ -5168,26 +5168,41 @@ bool AArch64TTIImpl::isProfitableToSinkOperands(
     return false;
   }
   case Instruction::Mul: {
+    auto ShouldSinkSplatForIndexedVariant = [](Value *V) {
+      auto VT = MVT::getVT(V->getType(), /*HandleUnknown=*/true);
+      return (VT == MVT::v4i16 || VT == MVT::v8i16 || VT == MVT::v2i32 ||
+              VT == MVT::v4i32);
----------------
davemgreen wrote:

Should we add handling for v16i16 and similar larger types too?

https://github.com/llvm/llvm-project/pull/116604


More information about the llvm-commits mailing list