[llvm] [PowerPC] Update chain uses when emitting lxsizx (PR #84892)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 03:28:16 PDT 2024


================
@@ -15024,6 +15024,7 @@ SDValue PPCTargetLowering::combineFPToIntToFP(SDNode *N,
     SDValue Ld = DAG.getMemIntrinsicNode(PPCISD::LXSIZX, dl,
                                          DAG.getVTList(MVT::f64, MVT::Other),
                                          Ops, MVT::i8, LDN->getMemOperand());
+    DAG.ReplaceAllUsesOfValueWith(FirstOperand.getValue(1), Ld.getValue(1));
----------------
nikic wrote:

If I'm reading the code correctly, the original load is not guaranteed to be removed (no one use check). In that case, this needs to use makeEquivalentMemoryOrdering instead.

https://github.com/llvm/llvm-project/pull/84892


More information about the llvm-commits mailing list