[llvm] [RISCV] Don't select sh{1, 2, 3}add if shl doesn't have one use (PR #143351)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 9 11:03:36 PDT 2025
================
@@ -14887,6 +14887,9 @@ static SDValue combineShlAddIAddImpl(SDNode *N, SDValue AddI, SDValue Other,
if (!sd_match(SHLVal, m_BinOp(ISD::SHL, m_Value(), m_ConstInt(VShift))))
return SDValue();
+ if (!SHLVal.hasOneUse())
----------------
topperc wrote:
We should also use m_Shl instead of m_BinOp on line 14887
https://github.com/llvm/llvm-project/pull/143351
More information about the llvm-commits
mailing list