[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelDAGToDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Sep 28 15:47:40 PDT 2005
Changes in directory llvm/lib/Target/PowerPC:
PPC32ISelDAGToDAG.cpp updated: 1.82 -> 1.83
---
Log message:
Use the autogenerated matcher for ADD/SUB
---
Diffs of the changes: (+0 -30)
PPC32ISelDAGToDAG.cpp | 30 ------------------------------
1 files changed, 30 deletions(-)
Index: llvm/lib/Target/PowerPC/PPC32ISelDAGToDAG.cpp
diff -u llvm/lib/Target/PowerPC/PPC32ISelDAGToDAG.cpp:1.82 llvm/lib/Target/PowerPC/PPC32ISelDAGToDAG.cpp:1.83
--- llvm/lib/Target/PowerPC/PPC32ISelDAGToDAG.cpp:1.82 Wed Sep 28 17:29:58 2005
+++ llvm/lib/Target/PowerPC/PPC32ISelDAGToDAG.cpp Wed Sep 28 17:47:28 2005
@@ -767,16 +767,6 @@
CurDAG->SelectNodeTo(N, PPC::FCTIWZ, N->getValueType(0),
Select(N->getOperand(0)));
return SDOperand(N, 0);
- case ISD::ADD:
- if (SDNode *I = SelectIntImmediateExpr(N->getOperand(0), N->getOperand(1),
- PPC::ADDIS, PPC::ADDI, true)) {
- CurDAG->ReplaceAllUsesWith(Op, SDOperand(I, 0));
- N = I;
- } else {
- CurDAG->SelectNodeTo(N, PPC::ADD, MVT::i32, Select(N->getOperand(0)),
- Select(N->getOperand(1)));
- }
- return SDOperand(N, 0);
case ISD::FADD: {
MVT::ValueType Ty = N->getValueType(0);
if (!NoExcessFPPrecision) { // Match FMA ops
@@ -803,26 +793,6 @@
Select(N->getOperand(0)), Select(N->getOperand(1)));
return SDOperand(N, 0);
}
- case ISD::SUB: {
- unsigned Imm;
- if (isIntImmediate(N->getOperand(0), Imm) && isInt16(Imm)) {
- if (0 == Imm)
- CurDAG->SelectNodeTo(N, PPC::NEG, MVT::i32, Select(N->getOperand(1)));
- else
- CurDAG->SelectNodeTo(N, PPC::SUBFIC, MVT::i32, Select(N->getOperand(1)),
- getI32Imm(Lo16(Imm)));
- return SDOperand(N, 0);
- }
- if (SDNode *I = SelectIntImmediateExpr(N->getOperand(0), N->getOperand(1),
- PPC::ADDIS, PPC::ADDI, true, true)) {
- CurDAG->ReplaceAllUsesWith(Op, SDOperand(I, 0));
- N = I;
- } else {
- CurDAG->SelectNodeTo(N, PPC::SUBF, MVT::i32, Select(N->getOperand(1)),
- Select(N->getOperand(0)));
- }
- return SDOperand(N, 0);
- }
case ISD::FSUB: {
MVT::ValueType Ty = N->getValueType(0);
More information about the llvm-commits
mailing list