[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp
Nate Begeman
natebegeman at mac.com
Wed Apr 13 14:23:42 PDT 2005
Changes in directory llvm/lib/Target/PowerPC:
PPC32ISelPattern.cpp updated: 1.68 -> 1.69
---
Log message:
Disbale the broken fold of shift + sz[ext] for now
Move the transform for select (a < 0) ? b : 0 into the dag from ppc isel
Enable the dag to fold and (setcc, 1) -> setcc for targets where setcc
always produces zero or one.
---
Diffs of the changes: (+0 -19)
PPC32ISelPattern.cpp | 19 -------------------
1 files changed, 19 deletions(-)
Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp
diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.68 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.69
--- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.68 Tue Apr 12 21:46:17 2005
+++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Wed Apr 13 16:23:31 2005
@@ -2126,25 +2126,6 @@
return 0;
case ISD::SELECT: {
- // We can codegen select (a < 0) ? b : 0 very efficiently compared to a
- // conditional branch. Check for that here.
- if (SetCCSDNode *SetCC = dyn_cast<SetCCSDNode>(N.getOperand(0).Val)) {
- if (ConstantSDNode *CN =
- dyn_cast<ConstantSDNode>(SetCC->getOperand(1).Val)) {
- if (ConstantSDNode *CNF =
- dyn_cast<ConstantSDNode>(N.getOperand(2).Val)) {
- if (CN->getValue() == 0 && CNF->getValue() == 0 &&
- SetCC->getCondition() == ISD::SETLT) {
- Tmp1 = SelectExpr(N.getOperand(1)); // TRUE value
- Tmp2 = SelectExpr(SetCC->getOperand(0));
- Tmp3 = MakeReg(MVT::i32);
- BuildMI(BB, PPC::SRAWI, 2, Tmp3).addReg(Tmp2).addImm(31);
- BuildMI(BB, PPC::AND, 2, Result).addReg(Tmp1).addReg(Tmp3);
- return Result;
- }
- }
- }
- }
unsigned TrueValue = SelectExpr(N.getOperand(1)); //Use if TRUE
unsigned FalseValue = SelectExpr(N.getOperand(2)); //Use if FALSE
Opc = SelectSetCR0(N.getOperand(0));
More information about the llvm-commits
mailing list