diff options
author | Nate Begeman <natebegeman@mac.com> | 2005-08-24 05:03:20 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2005-08-24 05:03:20 +0000 |
commit | c6b0717a6caa32fc9029fd1337af4bf0d07b54e8 (patch) | |
tree | 7524391df34e0d79acfd5ebe71eab87a06860341 | |
parent | 4b46fc094d219da7f9fa02acfa0bf228519f952d (diff) |
Remove unused statistic
Prefer 'neg X' to 'subfic 0, X' since neg does not set XER[CA]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23001 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp index 5300f59b89..8e3e9f73d1 100644 --- a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp +++ b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp @@ -28,7 +28,6 @@ using namespace llvm; namespace { - Statistic<> Recorded("ppc-codegen", "Number of recording ops emitted"); Statistic<> FusedFP ("ppc-codegen", "Number of fused fp operations"); Statistic<> FrameOff("ppc-codegen", "Number of frame idx offsets collapsed"); @@ -599,8 +598,11 @@ SDOperand PPC32DAGToDAGISel::Select(SDOperand Op) { if (Ty == MVT::i32) { unsigned Imm; if (isIntImmediate(N->getOperand(0), Imm) && isInt16(Imm)) { - CurDAG->SelectNodeTo(N, Ty, PPC::SUBFIC, Select(N->getOperand(1)), - getI32Imm(Lo16(Imm))); + if (0 == Imm) + CurDAG->SelectNodeTo(N, Ty, PPC::NEG, Select(N->getOperand(1))); + else + CurDAG->SelectNodeTo(N, Ty, PPC::SUBFIC, Select(N->getOperand(1)), + getI32Imm(Lo16(Imm))); break; } if (SDNode *I = SelectIntImmediateExpr(N->getOperand(0), N->getOperand(1), |