[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Chris Lattner
sabre at nondot.org
Mon Feb 12 17:06:13 PST 2007
Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAGISel.cpp updated: 1.360 -> 1.361
---
Log message:
Fix switch lowering to order cases in zext order, which is how we emit the
comparisons. This fixes an infinite loop on CodeGen/Generic/switch-lower.ll
and PR1197: http://llvm.org/PR1197
---
Diffs of the changes: (+2 -2)
SelectionDAGISel.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.360 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.361
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.360 Sat Feb 10 13:55:17 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Feb 12 19:05:56 2007
@@ -389,8 +389,8 @@
struct CaseCmp {
bool operator () (const Case& C1, const Case& C2) {
assert(isa<ConstantInt>(C1.first) && isa<ConstantInt>(C2.first));
- return cast<const ConstantInt>(C1.first)->getSExtValue() <
- cast<const ConstantInt>(C2.first)->getSExtValue();
+ return cast<const ConstantInt>(C1.first)->getZExtValue() <
+ cast<const ConstantInt>(C2.first)->getZExtValue();
}
};
More information about the llvm-commits
mailing list