fix 101 regressions
authorAndrew Lenharth <andrewl@lenharth.org>
Sun, 3 Apr 2005 18:24:50 +0000 (18:24 +0000)
committerAndrew Lenharth <andrewl@lenharth.org>
Sun, 3 Apr 2005 18:24:50 +0000 (18:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21063 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Alpha/AlphaISelPattern.cpp

index 6f093ba65f8d0e857f6a7f88237e68d3e93d2317..6e74a79dc3de3ef6a6960c9dcaccaa7a2ab1600a 100644 (file)
@@ -1591,7 +1591,7 @@ unsigned ISel::SelectExpr(SDOperand N) {
        //Int SetCC -> Select
        //Dropping the CC is only useful if we are comparing to 0
        if(SetCC->getOperand(1).getOpcode() == ISD::Constant &&
-          cast<ConstantSDNode>(SetCC->getOperand(0))->getValue() == 0)
+          cast<ConstantSDNode>(SetCC->getOperand(1))->getValue() == 0)
          {
            bool useI = (SetCC->getOperand(1).getOpcode() == ISD::Constant &&
                         cast<ConstantSDNode>(SetCC->getOperand(1))->getValue() <= 255);
@@ -1617,8 +1617,8 @@ unsigned ISel::SelectExpr(SDOperand N) {
                .addReg(SelectExpr(SetCC->getOperand(1)));
            return Result;
          }
-       if(SetCC->getOperand(1).getOpcode() == ISD::Constant &&
-          cast<ConstantSDNode>(SetCC->getOperand(1))->getValue() == 0)
+       if(SetCC->getOperand(0).getOpcode() == ISD::Constant &&
+          cast<ConstantSDNode>(SetCC->getOperand(0))->getValue() == 0)
          {
            bool useI = (SetCC->getOperand(0).getOpcode() == ISD::Constant &&
                         cast<ConstantSDNode>(SetCC->getOperand(0))->getValue() <= 255);