diff options
author | Dan Gohman <gohman@apple.com> | 2008-09-08 16:59:01 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-09-08 16:59:01 +0000 |
commit | 1df80f6b1c7e93422a1e5bf7065c425654154ba4 (patch) | |
tree | 3a1c09e5b74f5b61dffac2cde65f702f860686e5 | |
parent | ede2d7d7451189b618cb3a510bfb24ed2185f868 (diff) | |
download | bcm5719-llvm-1df80f6b1c7e93422a1e5bf7065c425654154ba4.tar.gz bcm5719-llvm-1df80f6b1c7e93422a1e5bf7065c425654154ba4.zip |
In visitUREM, arrange for the temporary UDIV node to be
revisited, consistent with the code in visitSREM.
llvm-svn: 55923
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 2d400bdfb25..53956afebe4 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/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); |