[llvm] [SLP]Initial support for copyables in fmuladd intrinsic (PR #211245)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 06:20:27 PDT 2026


================
@@ -12297,7 +12317,11 @@ class InstructionsCompatibilityAnalysis {
           count_if(Ops, [&](Value *V) { return OpS.isCopyableElement(V); });
       return CopyableNum <= VL.size() / 2;
     };
-    if (!CheckOperand(Operands.front()))
+    // The copyable value lands in the addend (back) for fmuladd, and in the
+    // first operand (front) for 2-operand ops.
+    ArrayRef<Value *> OperandToCheck =
+        IsFMulAdd ? Operands.back() : Operands.front();
----------------
RKSimon wrote:

Again - can we avoid the IsFMulAdd and be generic?

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


More information about the llvm-commits mailing list