[llvm] [DAG] Remove OneUse restriction on sext when folding (shl (sext (add_nsw x, c1)), c2) (PR #68972)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 15 06:12:09 PDT 2023
================
@@ -3304,6 +3304,13 @@ X86TargetLowering::preferredShiftLegalizationStrategy(
ExpansionFactor);
}
+bool X86TargetLowering::isDesirableToCommuteWithShift(
+ const SDNode *N, CombineLevel Level) const {
+ if (N->getOperand(0)->hasOneUse())
+ return true;
----------------
RKSimon wrote:
This doesn't look like the hasOneUse is being applied to the same operand as the original?
https://github.com/llvm/llvm-project/pull/68972
More information about the llvm-commits
mailing list