diff options
author | Dan Gohman <gohman@apple.com> | 2011-09-22 23:01:29 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2011-09-22 23:01:29 +0000 |
commit | e83e1b2d2c2811449221ff3784f340ec893cd4e2 (patch) | |
tree | b53edc6b189a6f8e9221c77953a453cabbf2025f /llvm/lib/CodeGen | |
parent | f05864ad7d4f53b21c809837071bde99afe28568 (diff) | |
download | bcm5719-llvm-e83e1b2d2c2811449221ff3784f340ec893cd4e2.tar.gz bcm5719-llvm-e83e1b2d2c2811449221ff3784f340ec893cd4e2.zip |
Fix SimplifySelectCC to add newly created nodes to the DAGCombiner
worklist, as it may be possible to perform further optimization on them.
llvm-svn: 140349
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 1b73b0711ea..7b878688df6 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -7500,10 +7500,13 @@ SDValue DAGCombiner::SimplifySelectCC(DebugLoc DL, SDValue N0, SDValue N1, SDValue Cond = DAG.getSetCC(DL, TLI.getSetCCResultType(N0.getValueType()), N0, N1, CC); + AddToWorkList(Cond.getNode()); SDValue CstOffset = DAG.getNode(ISD::SELECT, DL, Zero.getValueType(), Cond, One, Zero); + AddToWorkList(CstOffset.getNode()); CPIdx = DAG.getNode(ISD::ADD, DL, TLI.getPointerTy(), CPIdx, CstOffset); + AddToWorkList(CPIdx.getNode()); return DAG.getLoad(TV->getValueType(0), DL, DAG.getEntryNode(), CPIdx, MachinePointerInfo::getConstantPool(), false, false, Alignment); |