Skip to content

Commit 28dd6d4

Browse files
committed
[PowerPC] Use SelectionDAG::makeEquivalentMemoryOrdering(). NFC
1 parent 8675cd3 commit 28dd6d4

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

llvm/lib/Target/PowerPC/PPCISelLowering.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8651,22 +8651,13 @@ bool PPCTargetLowering::canReuseLoadAddress(SDValue Op, EVT MemVT,
86518651
// Given the head of the old chain, ResChain, insert a token factor containing
86528652
// it and NewResChain, and make users of ResChain now be users of that token
86538653
// factor.
8654-
// TODO: Remove and use DAG::makeEquivalentMemoryOrdering() instead.
86558654
void PPCTargetLowering::spliceIntoChain(SDValue ResChain,
86568655
SDValue NewResChain,
86578656
SelectionDAG &DAG) const {
86588657
if (!ResChain)
86598658
return;
86608659

8661-
SDLoc dl(NewResChain);
8662-
8663-
SDValue TF = DAG.getNode(ISD::TokenFactor, dl, MVT::Other,
8664-
NewResChain, DAG.getUNDEF(MVT::Other));
8665-
assert(TF.getNode() != NewResChain.getNode() &&
8666-
"A new TF really is required here");
8667-
8668-
DAG.ReplaceAllUsesOfValueWith(ResChain, TF);
8669-
DAG.UpdateNodeOperands(TF.getNode(), ResChain, NewResChain);
8660+
DAG.makeEquivalentMemoryOrdering(ResChain, NewResChain);
86708661
}
86718662

86728663
/// Analyze profitability of direct move

0 commit comments

Comments
 (0)