diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2005-06-08 18:02:21 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2005-06-08 18:02:21 +0000 |
commit | 09552bff8de55e056d1387390561f73c02d86b7f (patch) | |
tree | 2025ebb278d4a9fa4a49c02ece61202c0bcef1e6 | |
parent | eae435de837ea659fba924c1531ced120a6dde76 (diff) |
fix BranchCC with a setCC with an arg of 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22203 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/Alpha/AlphaISelPattern.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/Alpha/AlphaISelPattern.cpp b/lib/Target/Alpha/AlphaISelPattern.cpp index 4256f62947..e521a033a0 100644 --- a/lib/Target/Alpha/AlphaISelPattern.cpp +++ b/lib/Target/Alpha/AlphaISelPattern.cpp @@ -899,8 +899,8 @@ void ISel::SelectBranchCC(SDOperand N) //Dropping the CC is only useful if we are comparing to 0 bool LeftZero = SetCC->getOperand(0).getOpcode() == ISD::Constant && cast<ConstantSDNode>(SetCC->getOperand(0))->getValue() == 0; - bool RightZero = SetCC->getOperand(0).getOpcode() == ISD::Constant && - cast<ConstantSDNode>(SetCC->getOperand(0))->getValue() == 0; + bool RightZero = SetCC->getOperand(1).getOpcode() == ISD::Constant && + cast<ConstantSDNode>(SetCC->getOperand(1))->getValue() == 0; bool isNE = false; //Fix up CC @@ -912,7 +912,7 @@ void ISel::SelectBranchCC(SDOperand N) isNE = true; if (LeftZero || RightZero) { - switch (SetCC->getCondition()) { + switch (cCode) { default: CC.Val->dump(); assert(0 && "Unknown integer comparison!"); case ISD::SETEQ: Opc = Alpha::BEQ; break; case ISD::SETLT: Opc = Alpha::BLT; break; |