[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
Evan Cheng
evan.cheng at apple.com
Wed Nov 29 15:46:41 PST 2006
Changes in directory llvm/lib/Target/X86:
X86ISelDAGToDAG.cpp updated: 1.131 -> 1.132
---
Log message:
Clean up.
---
Diffs of the changes: (+8 -8)
X86ISelDAGToDAG.cpp | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.131 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.132
--- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.131 Wed Nov 29 17:19:45 2006
+++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Wed Nov 29 17:46:27 2006
@@ -643,11 +643,13 @@
// For X86-64 PIC code, only allow GV / CP + displacement so we can use RIP
// relative addressing mode.
- if ((!Subtarget->is64Bit() || TM.getCodeModel() == CodeModel::Small) &&
- (!Available || (AM.Base.Reg.Val && AM.IndexReg.Val))) {
+ if (Subtarget->is64Bit() && TM.getCodeModel() != CodeModel::Small)
+ break;
+ if (!Available || (AM.Base.Reg.Val && AM.IndexReg.Val)) {
bool isRIP = Subtarget->is64Bit();
- if (isRIP && (AM.Base.Reg.Val || AM.Scale > 1 || AM.IndexReg.Val ||
- AM.BaseType == X86ISelAddressMode::FrameIndexBase))
+ if (isRIP &&
+ (AM.Base.Reg.Val || AM.Scale > 1 || AM.IndexReg.Val ||
+ AM.BaseType == X86ISelAddressMode::FrameIndexBase))
break;
if (ConstantPoolSDNode *CP =
dyn_cast<ConstantPoolSDNode>(N.getOperand(0))) {
@@ -655,8 +657,7 @@
AM.CP = CP->getConstVal();
AM.Align = CP->getAlignment();
AM.Disp += CP->getOffset();
- if (isRIP)
- AM.isRIPRel = true;
+ AM.isRIPRel = isRIP;
return false;
}
} else if (GlobalAddressSDNode *G =
@@ -664,8 +665,7 @@
if (AM.GV == 0) {
AM.GV = G->getGlobal();
AM.Disp += G->getOffset();
- if (isRIP)
- AM.isRIPRel = true;
+ AM.isRIPRel = isRIP;
return false;
}
} else if (isRoot && isRIP) {
More information about the llvm-commits
mailing list