[llvm] [PowerPC] Check ResNo at end of BitPermutationSelector::Select32 (PR #151429)
Nemanja Ivanovic via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 18 01:12:00 PDT 2025
================
@@ -4104,8 +4104,9 @@ bool PPCDAGToDAGISel::tryBitPermutation(SDNode *N) {
case ISD::AND:
case ISD::OR: {
BitPermutationSelector BPS(CurDAG);
- if (SDNode *New = BPS.Select(N)) {
- ReplaceNode(N, New);
+ if (SDValue New = BPS.Select(N)) {
+ CurDAG->ReplaceAllUsesWith(N, &New);
+ CurDAG->RemoveDeadNode(N);
----------------
nemanjai wrote:
Do we need the call to `RemoveDeadNode()` here? Doesn't the DAG automatically do CSE?
https://github.com/llvm/llvm-project/pull/151429
More information about the llvm-commits
mailing list