[llvm] [SelectionDAG][PowerPC] Remove setTruncatingStore from StoreSDNode. (PR #137667)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 28 10:47:28 PDT 2025
================
@@ -16562,13 +16562,16 @@ SDValue PPCTargetLowering::PerformDAGCombine(SDNode *N,
MemVT.getSizeInBits());
SDValue Const64 = DAG.getConstant(Val64, dl, MVT::i64);
- // DAG.getTruncStore() can't be used here because it doesn't accept
- // the general (base + offset) addressing mode.
- // So we use UpdateNodeOperands and setTruncatingStore instead.
- DAG.UpdateNodeOperands(N, N->getOperand(0), Const64, N->getOperand(2),
- N->getOperand(3));
- cast<StoreSDNode>(N)->setTruncatingStore(true);
- return SDValue(N, 0);
+ auto *ST = cast<StoreSDNode>(N);
+ SDValue NewST = DAG.getStore(ST->getChain(), dl, Const64,
+ ST->getBasePtr(), ST->getOffset(), MemVT,
+ ST->getMemOperand(), ST->getAddressingMode(),
+ /*IsTruncating=*/true);
+ // Note we use CombineTo here to prevent DAGCombine from visiting the
----------------
s-barannikov wrote:
```suggestion
// Note we use CombineTo here to prevent DAGCombiner from visiting the
```
https://github.com/llvm/llvm-project/pull/137667
More information about the llvm-commits
mailing list