[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelPattern.cpp
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Wed Jun 8 11:02:40 PDT 2005
Changes in directory llvm/lib/Target/Alpha:
AlphaISelPattern.cpp updated: 1.121 -> 1.122
---
Log message:
fix BranchCC with a setCC with an arg of 0
---
Diffs of the changes: (+3 -3)
AlphaISelPattern.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Index: llvm/lib/Target/Alpha/AlphaISelPattern.cpp
diff -u llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.121 llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.122
--- llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.121 Mon Jun 6 14:08:04 2005
+++ llvm/lib/Target/Alpha/AlphaISelPattern.cpp Wed Jun 8 13:02:21 2005
@@ -899,8 +899,8 @@
//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 @@
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;
More information about the llvm-commits
mailing list