aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-09-29 21:13:15 +0000
committerDan Gohman <gohman@apple.com>2008-09-29 21:13:15 +0000
commit7962e856d1460cc61ce246e31ca77e99f85228a3 (patch)
tree0b89f049b6e059b748da37c4d0dccdfcc5381ec5
parent652203f3f3b6dd5062bb450d189a80d8aaa51693 (diff)
Fix an over-pessimization about GlobalVariable addresses in X86FastISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56802 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86FastISel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/X86/X86FastISel.cpp b/lib/Target/X86/X86FastISel.cpp
index d266451075..3bce3b0c9c 100644
--- a/lib/Target/X86/X86FastISel.cpp
+++ b/lib/Target/X86/X86FastISel.cpp
@@ -462,7 +462,7 @@ bool X86FastISel::X86SelectAddress(Value *V, X86AddressMode &AM, bool isCall) {
}
// If all else fails, try to materialize the value in a register.
- if (!AM.GV && getTargetMachine()->symbolicAddressesAreRIPRel()) {
+ if (!AM.GV || !getTargetMachine()->symbolicAddressesAreRIPRel()) {
if (AM.Base.Reg == 0) {
AM.Base.Reg = getRegForValue(V);
return AM.Base.Reg != 0;