[llvm] [RISCV] Add isel optimization for (and (sra y, c2), c1) to recover regression from #101751. (PR #104114)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 23 09:02:27 PDT 2024
================
@@ -3019,6 +3040,33 @@ bool RISCVDAGToDAGISel::selectSHXADDOp(SDValue N, unsigned ShAmt,
return true;
}
}
+ } else if (N0.getOpcode() == ISD::SRA && N0.hasOneUse() &&
+ isa<ConstantSDNode>(N.getOperand(1))) {
----------------
dtcxzyw wrote:
```
isa<ConstantSDNode>(N.getOperand(1)) && isa<ConstantSDNode>(N0.getOperand(1))
```
https://github.com/llvm/llvm-project/pull/104114
More information about the llvm-commits
mailing list