aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-09-08 16:59:01 +0000
committerDan Gohman <gohman@apple.com>2008-09-08 16:59:01 +0000
commit942ca7f808b88b8789c665a3733e58c75320834f (patch)
tree79e79b4384270a6bc06cfab44c2ce3c0bf7e7417 /lib
parent1e0e04caace14a1bdedcf5aef2271e1c031b27b4 (diff)
downloadexternal_llvm-942ca7f808b88b8789c665a3733e58c75320834f.zip
external_llvm-942ca7f808b88b8789c665a3733e58c75320834f.tar.gz
external_llvm-942ca7f808b88b8789c665a3733e58c75320834f.tar.bz2
In visitUREM, arrange for the temporary UDIV node to be
revisited, consistent with the code in visitSREM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55923 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 2d400bd..53956af 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -1423,6 +1423,7 @@ SDValue DAGCombiner::visitUREM(SDNode *N) {
// X%C to the equivalent of X-X/C*C.
if (N1C && !N1C->isNullValue()) {
SDValue Div = DAG.getNode(ISD::UDIV, VT, N0, N1);
+ AddToWorkList(Div.getNode());
SDValue OptimizedDiv = combine(Div.getNode());
if (OptimizedDiv.getNode() && OptimizedDiv.getNode() != Div.getNode()) {
SDValue Mul = DAG.getNode(ISD::MUL, VT, OptimizedDiv, N1);