Deleted Added
full compact
SparcISelDAGToDAG.cpp (208954) SparcISelDAGToDAG.cpp (212904)
1//===-- SparcISelDAGToDAG.cpp - A dag to dag inst selector for Sparc ------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 70 unchanged lines hidden (view full) ---

79 return true;
80 }
81 if (Addr.getOpcode() == ISD::TargetExternalSymbol ||
82 Addr.getOpcode() == ISD::TargetGlobalAddress)
83 return false; // direct calls.
84
85 if (Addr.getOpcode() == ISD::ADD) {
86 if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(Addr.getOperand(1))) {
1//===-- SparcISelDAGToDAG.cpp - A dag to dag inst selector for Sparc ------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 70 unchanged lines hidden (view full) ---

79 return true;
80 }
81 if (Addr.getOpcode() == ISD::TargetExternalSymbol ||
82 Addr.getOpcode() == ISD::TargetGlobalAddress)
83 return false; // direct calls.
84
85 if (Addr.getOpcode() == ISD::ADD) {
86 if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(Addr.getOperand(1))) {
87 if (Predicate_simm13(CN)) {
87 if (isInt<13>(CN->getSExtValue())) {
88 if (FrameIndexSDNode *FIN =
89 dyn_cast<FrameIndexSDNode>(Addr.getOperand(0))) {
90 // Constant offset from frame ref.
91 Base = CurDAG->getTargetFrameIndex(FIN->getIndex(), MVT::i32);
92 } else {
93 Base = Addr.getOperand(0);
94 }
95 Offset = CurDAG->getTargetConstant(CN->getZExtValue(), MVT::i32);

--- 19 unchanged lines hidden (view full) ---

115bool SparcDAGToDAGISel::SelectADDRrr(SDNode *Op, SDValue Addr,
116 SDValue &R1, SDValue &R2) {
117 if (Addr.getOpcode() == ISD::FrameIndex) return false;
118 if (Addr.getOpcode() == ISD::TargetExternalSymbol ||
119 Addr.getOpcode() == ISD::TargetGlobalAddress)
120 return false; // direct calls.
121
122 if (Addr.getOpcode() == ISD::ADD) {
88 if (FrameIndexSDNode *FIN =
89 dyn_cast<FrameIndexSDNode>(Addr.getOperand(0))) {
90 // Constant offset from frame ref.
91 Base = CurDAG->getTargetFrameIndex(FIN->getIndex(), MVT::i32);
92 } else {
93 Base = Addr.getOperand(0);
94 }
95 Offset = CurDAG->getTargetConstant(CN->getZExtValue(), MVT::i32);

--- 19 unchanged lines hidden (view full) ---

115bool SparcDAGToDAGISel::SelectADDRrr(SDNode *Op, SDValue Addr,
116 SDValue &R1, SDValue &R2) {
117 if (Addr.getOpcode() == ISD::FrameIndex) return false;
118 if (Addr.getOpcode() == ISD::TargetExternalSymbol ||
119 Addr.getOpcode() == ISD::TargetGlobalAddress)
120 return false; // direct calls.
121
122 if (Addr.getOpcode() == ISD::ADD) {
123 if (isa<ConstantSDNode>(Addr.getOperand(1)) &&
124 Predicate_simm13(Addr.getOperand(1).getNode()))
125 return false; // Let the reg+imm pattern catch this!
123 if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(Addr.getOperand(1)))
124 if (isInt<13>(CN->getSExtValue()))
125 return false; // Let the reg+imm pattern catch this!
126 if (Addr.getOperand(0).getOpcode() == SPISD::Lo ||
127 Addr.getOperand(1).getOpcode() == SPISD::Lo)
128 return false; // Let the reg+imm pattern catch this!
129 R1 = Addr.getOperand(0);
130 R2 = Addr.getOperand(1);
131 return true;
132 }
133

--- 81 unchanged lines hidden ---
126 if (Addr.getOperand(0).getOpcode() == SPISD::Lo ||
127 Addr.getOperand(1).getOpcode() == SPISD::Lo)
128 return false; // Let the reg+imm pattern catch this!
129 R1 = Addr.getOperand(0);
130 R2 = Addr.getOperand(1);
131 return true;
132 }
133

--- 81 unchanged lines hidden ---