[llvm] [AArch64][SelectionDAG] Lower multiplication by a constant to shl+add+shl+add (PR #89532)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 21 11:02:02 PDT 2024


================
@@ -17632,6 +17651,10 @@ static SDValue performMulCombine(SDNode *N, SelectionDAG &DAG,
         SDValue MVal = Add(Shl(N0, ShiftM1), N0);
         return Add(Shl(MVal, ShiftN1), MVal);
       }
+    } else if (Subtarget->hasALULSLFast() &&
----------------
efriedma-quic wrote:

hasALULSLFast() specifically refers to shift amounts of 4 or less.

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


More information about the llvm-commits mailing list