[llvm] [DAG] Remove OneUse restriction on sext when folding (shl (sext (add_nsw x, c1)), c2) (PR #68972)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 15 11:15:33 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;
----------------
goldsteinn wrote:
+1
https://github.com/llvm/llvm-project/pull/68972
More information about the llvm-commits
mailing list