summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-09-12 05:25:41 +0000
committerCraig Topper <craig.topper@intel.com>2018-09-12 05:25:41 +0000
commit26a37998588f673ef1e3fc4a126f2a0963dad6bb (patch)
tree6d9dac64695f722defc0a60564a9dcfc91cef93e /llvm/lib/CodeGen/SelectionDAG
parent8f2499f804d81d4148dea9d3890dc8b48dcd0334 (diff)
downloadbcm5719-llvm-26a37998588f673ef1e3fc4a126f2a0963dad6bb.tar.gz
bcm5719-llvm-26a37998588f673ef1e3fc4a126f2a0963dad6bb.zip
[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. llvm-svn: 342022
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
index 04bd84c51c8..68b73807e9a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
@@ -1260,14 +1260,7 @@ SDValue DAGTypeLegalizer::PromoteIntOp_MGATHER(MaskedGatherSDNode *N,
} 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,
OpenPOWER on IntegriCloud