[llvm] [DAGCombine] Remove oneuse restrictions for RISCV in folding (shl (add_nsw x, c1)), c2) and folding (shl(sext(add x, c1)), c2) in some scenarios (PR #101294)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 16 22:15:59 PST 2024
================
@@ -17910,6 +17910,13 @@ AArch64TargetLowering::isDesirableToCommuteWithShift(const SDNode *N,
SDValue ShiftLHS = N->getOperand(0);
EVT VT = N->getValueType(0);
+ if (!ShiftLHS->hasOneUse())
----------------
topperc wrote:
Does this logic need to be added to the default implementation of `isDesirableToCommuteWithShift` for targets that don't override it? I believe the default returns `true`
https://github.com/llvm/llvm-project/pull/101294
More information about the llvm-commits
mailing list