[llvm] [RISCV] Don't select sh{1, 2, 3}add if shl doesn't have one use (PR #143351)
Jim Lin via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 9 19:58:01 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())
----------------
tclin914 wrote:
Fixed.
https://github.com/llvm/llvm-project/pull/143351
More information about the llvm-commits
mailing list