[llvm-commits] [llvm] r56376 - /llvm/trunk/lib/Target/X86/X86FastISel.cpp
Dan Gohman
gohman at apple.com
Fri Sep 19 16:42:05 PDT 2008
Author: djg
Date: Fri Sep 19 18:42:04 2008
New Revision: 56376
URL: http://llvm.org/viewvc/llvm-project?rev=56376&view=rev
Log:
Fix a FastISel GlobalVariable CSE bug.
Modified:
llvm/trunk/lib/Target/X86/X86FastISel.cpp
Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=56376&r1=56375&r2=56376&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Fri Sep 19 18:42:04 2008
@@ -379,8 +379,10 @@
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;
More information about the llvm-commits
mailing list