summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-10-21 21:23:25 +0000
committerChris Lattner <sabre@nondot.org>2005-10-21 21:23:25 +0000
commit75ea5b10bf7579e33c23a965a261e84717b4ed81 (patch)
tree0f45cbd808c2ae8f606e03bad07b77b02a9ec43f /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parente296949fbef682f0676f972332e3150eb4ee7ed4 (diff)
downloadbcm5719-llvm-75ea5b10bf7579e33c23a965a261e84717b4ed81.tar.gz
bcm5719-llvm-75ea5b10bf7579e33c23a965a261e84717b4ed81.zip
add a case missing from the dag combiner that exposed the failure on
2005-10-21-longlonggtu.ll. llvm-svn: 23875
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index b523bce339a..3efc25aebdc 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -2370,6 +2370,9 @@ SDOperand DAGCombiner::SimplifySetCC(MVT::ValueType VT, SDOperand N0,
// Canonicalize setgt X, Min --> setne X, Min
if ((Cond == ISD::SETGT || Cond == ISD::SETUGT) && C1 == MinVal)
return DAG.getSetCC(VT, N0, N1, ISD::SETNE);
+ // Canonicalize setlt X, Max --> setne X, Max
+ if ((Cond == ISD::SETLT || Cond == ISD::SETULT) && C1 == MaxVal)
+ return DAG.getSetCC(VT, N0, N1, ISD::SETNE);
// If we have setult X, 1, turn it into seteq X, 0
if ((Cond == ISD::SETLT || Cond == ISD::SETULT) && C1 == MinVal+1)
OpenPOWER on IntegriCloud