summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-09-25 23:52:07 +0000
committerCraig Topper <craig.topper@intel.com>2018-09-25 23:52:07 +0000
commitb2a00acb2414bb1fee23d97085631202d9fb665c (patch)
tree4deacc9135bd02bbb4eb772cd80a604ee3f6bbf1 /llvm/lib/CodeGen
parente527df03c44d2ea14b68865a96690008ae2a7960 (diff)
downloadbcm5719-llvm-b2a00acb2414bb1fee23d97085631202d9fb665c.tar.gz
bcm5719-llvm-b2a00acb2414bb1fee23d97085631202d9fb665c.zip
[DAGCombiner] Remove unnecessary check for visitSDIVLike/visitUDIVLike returning a UDIVREM or SDIVREM node.
This shouldn't be possible and is a leftover from when we used to recursively call combine here. llvm-svn: 343049
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index fe3dc39fa09..ad8121babe4 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -3424,8 +3424,7 @@ SDValue DAGCombiner::visitREM(SDNode *N) {
if (DAG.isKnownNeverZero(N1) && !TLI.isIntDivCheap(VT, Attr)) {
SDValue OptimizedDiv =
isSigned ? visitSDIVLike(N0, N1, N) : visitUDIVLike(N0, N1, N);
- if (OptimizedDiv.getNode() && OptimizedDiv.getOpcode() != ISD::UDIVREM &&
- OptimizedDiv.getOpcode() != ISD::SDIVREM) {
+ if (OptimizedDiv.getNode()) {
SDValue Mul = DAG.getNode(ISD::MUL, DL, VT, OptimizedDiv, N1);
SDValue Sub = DAG.getNode(ISD::SUB, DL, VT, N0, Mul);
AddToWorklist(OptimizedDiv.getNode());
OpenPOWER on IntegriCloud