revert my previous switch lowering change, which miscompiles a few programs.
authorChris Lattner <sabre@nondot.org>
Tue, 13 Feb 2007 20:09:07 +0000 (20:09 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 13 Feb 2007 20:09:07 +0000 (20:09 +0000)
This will break a dj test until I have time to investigate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34247 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index cb003e4a95665ea0bea1ce954e2b8a2dc20d775c..e2bda6d4c41f79000d98127446a0d3fae6cf3c6a 100644 (file)
@@ -389,8 +389,8 @@ class SelectionDAGLowering {
   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)->getZExtValue() <
-        cast<const ConstantInt>(C2.first)->getZExtValue();
+      return cast<const ConstantInt>(C1.first)->getSExtValue() <
+        cast<const ConstantInt>(C2.first)->getSExtValue();
     }
   };