[llvm] r342022 - [SelectionDAG] Remove some code from PromoteIntOp_MGATHER that handles UpdateNodeOperands returning an existing node instead of updating.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 11 22:25:42 PDT 2018
Author: ctopper
Date: Tue Sep 11 22:25:41 2018
New Revision: 342022
URL: http://llvm.org/viewvc/llvm-project?rev=342022&view=rev
Log:
[SelectionDAG] Remove some code from PromoteIntOp_MGATHER that handles UpdateNodeOperands returning an existing node instead of updating.
I suspect this became unecessary when the CSE of mgather was fixed in r338080. It may still be possible to hit this if we widen the element type of a gather outside of type legalization and the promote the mask of a separate gather node so they become the same. But that seems pretty unlikely.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp?rev=342022&r1=342021&r2=342022&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp Tue Sep 11 22:25:41 2018
@@ -1260,14 +1260,7 @@ SDValue DAGTypeLegalizer::PromoteIntOp_M
} else
NewOps[OpNo] = GetPromotedInteger(N->getOperand(OpNo));
- SDValue Res = SDValue(DAG.UpdateNodeOperands(N, NewOps), 0);
- // updated in place.
- if (Res.getNode() == N)
- return Res;
-
- ReplaceValueWith(SDValue(N, 0), Res.getValue(0));
- ReplaceValueWith(SDValue(N, 1), Res.getValue(1));
- return SDValue();
+ return SDValue(DAG.UpdateNodeOperands(N, NewOps), 0);
}
SDValue DAGTypeLegalizer::PromoteIntOp_MSCATTER(MaskedScatterSDNode *N,
More information about the llvm-commits
mailing list