diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-01-08 02:06:11 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-01-08 02:06:11 +0000 |
commit | 17e39d6768de3b235c4eeb88bb345afd1f91b9c0 (patch) | |
tree | 6b9685319b75d57017ec99d6988b1e2113eae3bc | |
parent | 865b7ffd3452ad3ffdfc199be1ede500405b6617 (diff) | |
download | external_llvm-17e39d6768de3b235c4eeb88bb345afd1f91b9c0.zip external_llvm-17e39d6768de3b235c4eeb88bb345afd1f91b9c0.tar.gz external_llvm-17e39d6768de3b235c4eeb88bb345afd1f91b9c0.tar.bz2 |
Fix a x86-64 static codegen bug. This fixes a lot of x86-64 jit failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45733 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/X86ISelDAGToDAG.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp index bc2870e..9887bcc 100644 --- a/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -1091,7 +1091,10 @@ SDNode *X86DAGToDAGISel::Select(SDOperand N) { // Turn ADD X, c to MOV32ri X+c. This cannot be done with tblgen'd // code and is matched first so to prevent it from being turned into // LEA32r X+c. - // In 64-bit mode, use LEA to take advantage of RIP-relative addressing. + // In 64-bit small code size mode, use LEA to take advantage of + // RIP-relative addressing. + if (TM.getCodeModel() != CodeModel::Small) + break; MVT::ValueType PtrVT = TLI.getPointerTy(); SDOperand N0 = N.getOperand(0); SDOperand N1 = N.getOperand(1); |