[llvm-commits] [llvm] r55923 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Dan Gohman
gohman at apple.com
Mon Sep 8 09:59:02 PDT 2008
Author: djg
Date: Mon Sep 8 11:59:01 2008
New Revision: 55923
URL: http://llvm.org/viewvc/llvm-project?rev=55923&view=rev
Log:
In visitUREM, arrange for the temporary UDIV node to be
revisited, consistent with the code in visitSREM.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=55923&r1=55922&r2=55923&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Sep 8 11:59:01 2008
@@ -1423,6 +1423,7 @@
// 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);
More information about the llvm-commits
mailing list