summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-09-19 23:42:04 +0000
committerDan Gohman <gohman@apple.com>2008-09-19 23:42:04 +0000
commit098786e9f79cb5fde96e842f9ef40555f55683cf (patch)
treec225b3e67eb224598ae91b8e8f03a059332100af /llvm/lib/Target
parentd4c2337ef55f146e8ed0122a9407257e56b39717 (diff)
downloadbcm5719-llvm-098786e9f79cb5fde96e842f9ef40555f55683cf.tar.gz
bcm5719-llvm-098786e9f79cb5fde96e842f9ef40555f55683cf.zip
Fix a FastISel GlobalVariable CSE bug.
llvm-svn: 56376
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/X86/X86FastISel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp
index 040eb0d4f77..309a3f3f798 100644
--- a/llvm/lib/Target/X86/X86FastISel.cpp
+++ b/llvm/lib/Target/X86/X86FastISel.cpp
@@ -379,8 +379,10 @@ bool X86FastISel::X86SelectAddress(Value *V, X86AddressMode &AM, bool isCall) {
if (Subtarget->GVRequiresExtraLoad(GV, TM, isCall)) {
// Check to see if we've already materialized this
// value in a register in this block.
- if (unsigned Reg = LocalValueMap[V])
- return Reg;
+ if (unsigned Reg = LocalValueMap[V]) {
+ AM.Base.Reg = Reg;
+ return true;
+ }
// Issue load from stub if necessary.
unsigned Opc = 0;
const TargetRegisterClass *RC = NULL;
OpenPOWER on IntegriCloud