[llvm] [DAG] Remove OneUse restriction when folding (shl (add x, c1), c2) (PR #101294)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 3 05:16:10 PDT 2024
================
@@ -1036,6 +1036,11 @@ bool AMDGPUTargetLowering::isDesirableToCommuteWithShift(
assert((N->getOpcode() == ISD::SHL || N->getOpcode() == ISD::SRA ||
N->getOpcode() == ISD::SRL) &&
"Expected shift op");
+
+ // if (!N->getOperand(0).hasOneUse()) {
+ // return false;
+ // }
+
----------------
LiqinWeng wrote:
just for test ~~~have removed!
https://github.com/llvm/llvm-project/pull/101294
More information about the llvm-commits
mailing list