summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2005-06-08 18:02:21 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2005-06-08 18:02:21 +0000
commitc504a3db60dc00b5ed76a16ef6646a6b7b9e71db (patch)
treeb61363b1724747b3bd2bb215a7f35d8d41c21865 /llvm
parent8086cfaa6a380d2b5ec8ba036ec1129b2969ffc5 (diff)
downloadbcm5719-llvm-c504a3db60dc00b5ed76a16ef6646a6b7b9e71db.tar.gz
bcm5719-llvm-c504a3db60dc00b5ed76a16ef6646a6b7b9e71db.zip
fix BranchCC with a setCC with an arg of 0
llvm-svn: 22203
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/Alpha/AlphaISelPattern.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/Alpha/AlphaISelPattern.cpp b/llvm/lib/Target/Alpha/AlphaISelPattern.cpp
index 4256f629477..e521a033a0a 100644
--- a/llvm/lib/Target/Alpha/AlphaISelPattern.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud