SDAG: Avoid relying on the return value of SelectCode in Hexagon. NFC

This is a bit of a spot fix for now. I'll try to fix this up more
comprehensively soon.

This is part of the work to have Select return void instead of an
SDNode *, which is in turn part of llvm.org/pr26808.

llvm-svn: 269112
This commit is contained in:
Justin Bogner 2016-05-10 20:31:53 +00:00
parent 7d6e81d179
commit dcb7a821b8
1 changed files with 11 additions and 3 deletions

View File

@ -570,7 +570,13 @@ SDNode *HexagonDAGToDAGISel::StoreInstrForLoadIntrinsic(MachineSDNode *LoadN,
else
TS = CurDAG->getTruncStore(SDValue(LoadN,2), dl, SDValue(LoadN,0), Loc, PI,
MVT::getIntegerVT(Size*8), false, false, Size);
SDNode *StoreN = SelectStore(TS.getNode());
SDNode *StoreN;
{
HandleSDNode Handle(TS);
SelectStore(TS.getNode());
StoreN = Handle.getValue().getNode();
}
// Load's results are { Loaded value, Updated pointer, Chain }
ReplaceUses(SDValue(IntN, 0), SDValue(LoadN, 1));
@ -720,7 +726,8 @@ SDNode *HexagonDAGToDAGISel::SelectIndexedStore(StoreSDNode *ST, SDLoc dl) {
ReplaceUses(ST, Result);
ReplaceUses(SDValue(ST,1), SDValue(Result,1));
return Result;
CurDAG->RemoveDeadNode(ST);
return nullptr;
}
// Note: Order of operands matches the def of instruction:
@ -767,7 +774,8 @@ SDNode *HexagonDAGToDAGISel::SelectIndexedStore(StoreSDNode *ST, SDLoc dl) {
ReplaceUses(SDValue(ST,0), SDValue(Result_2,0));
ReplaceUses(SDValue(ST,1), SDValue(Result_1,0));
return Result_2;
CurDAG->RemoveDeadNode(ST);
return nullptr;
}
SDNode *HexagonDAGToDAGISel::SelectStore(SDNode *N) {