[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp
Nate Begeman
natebegeman at mac.com
Tue Aug 23 22:07:00 PDT 2005
Changes in directory llvm/lib/Target/PowerPC:
PPC32ISelPattern.cpp updated: 1.160 -> 1.161
---
Log message:
Whoops, fix a thinko. All cases except SETNE are now handled by the
target independent code in SelectionDAG.cpp
---
Diffs of the changes: (+3 -11)
PPC32ISelPattern.cpp | 14 +++-----------
1 files changed, 3 insertions(+), 11 deletions(-)
Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp
diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.160 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.161
--- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.160 Tue Aug 23 23:59:21 2005
+++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Wed Aug 24 00:06:48 2005
@@ -1667,19 +1667,11 @@
ConstantSDNode *N2C = dyn_cast<ConstantSDNode>(N.getOperand(2));
ConstantSDNode *N3C = dyn_cast<ConstantSDNode>(N.getOperand(3));
if (N1C && N2C && N3C && N1C->isNullValue() && N3C->isNullValue() &&
- N2C->getValue() == 1ULL && (CC == ISD::SETNE || CC == ISD::SETEQ)) {
+ N2C->getValue() == 1ULL && CC == ISD::SETNE) {
Tmp1 = SelectExpr(Node->getOperand(0));
Tmp2 = MakeIntReg();
- if (CC == ISD::SETNE) {
- BuildMI(BB, PPC::ADDIC, 2, Tmp2).addReg(Tmp1).addSImm(-1);
- BuildMI(BB, PPC::SUBFE, 2, Result).addReg(Tmp2).addReg(Tmp1);
- } else {
- Tmp3 = MakeIntReg();
- BuildMI(BB, PPC::NEG, 2, Tmp2).addReg(Tmp1);
- BuildMI(BB, PPC::ANDC, 2, Tmp3).addReg(Tmp2).addReg(Tmp1);
- BuildMI(BB, PPC::RLWINM, 4, Result).addReg(Tmp3).addImm(1).addImm(31)
- .addImm(31);
- }
+ BuildMI(BB, PPC::ADDIC, 2, Tmp2).addReg(Tmp1).addSImm(-1);
+ BuildMI(BB, PPC::SUBFE, 2, Result).addReg(Tmp2).addReg(Tmp1);
return Result;
}
More information about the llvm-commits
mailing list