diff options
author | Nate Begeman <natebegeman@mac.com> | 2005-08-24 05:06:48 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2005-08-24 05:06:48 +0000 |
commit | 6ef4949a0bea3f22e7572119d3692b1a5866ffe8 (patch) | |
tree | b8106b770aa5b9878cd3853ad91c650157c79b1b /lib/Target/PowerPC/PPCISelPattern.cpp | |
parent | c6b0717a6caa32fc9029fd1337af4bf0d07b54e8 (diff) |
Whoops, fix a thinko. All cases except SETNE are now handled by the
target independent code in SelectionDAG.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23002 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCISelPattern.cpp')
-rw-r--r-- | lib/Target/PowerPC/PPCISelPattern.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/Target/PowerPC/PPCISelPattern.cpp b/lib/Target/PowerPC/PPCISelPattern.cpp index d927929f68..2f79380827 100644 --- a/lib/Target/PowerPC/PPCISelPattern.cpp +++ b/lib/Target/PowerPC/PPCISelPattern.cpp @@ -1667,19 +1667,11 @@ unsigned ISel::SelectExpr(SDOperand N, bool Recording) { 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; } |