summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2014-06-03 21:01:39 +0000
committerEric Christopher <echristo@gmail.com>2014-06-03 21:01:39 +0000
commitdd240fd79cc26454aa61906d1e688cec2d7f22fd (patch)
tree15b5548253e71ba2bb0284de1930a22d203f0934 /llvm
parent31b81ce5ee4e409ebc77f8b15e1cea0fea522d72 (diff)
downloadbcm5719-llvm-dd240fd79cc26454aa61906d1e688cec2d7f22fd.tar.gz
bcm5719-llvm-dd240fd79cc26454aa61906d1e688cec2d7f22fd.zip
Revert r209381 as it isn't a local variable. Add a testcase so that
we know next time this happens. llvm-svn: 210127
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/X86/X86FixupLEAs.cpp1
-rw-r--r--llvm/test/CodeGen/X86/atom-fixup-lea4.ll23
2 files changed, 24 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86FixupLEAs.cpp b/llvm/lib/Target/X86/X86FixupLEAs.cpp
index 6c62d4ae1b1..bf7c1fa1827 100644
--- a/llvm/lib/Target/X86/X86FixupLEAs.cpp
+++ b/llvm/lib/Target/X86/X86FixupLEAs.cpp
@@ -150,6 +150,7 @@ FixupLEAPass::postRAConvertToLEA(MachineFunction::iterator &MFI,
FunctionPass *llvm::createX86FixupLEAs() { return new FixupLEAPass(); }
bool FixupLEAPass::runOnMachineFunction(MachineFunction &Func) {
+ MF = &Func;
TM = &Func.getTarget();
const X86Subtarget &ST = TM->getSubtarget<X86Subtarget>();
if (!ST.LEAusesAG() && !ST.slowLEA())
diff --git a/llvm/test/CodeGen/X86/atom-fixup-lea4.ll b/llvm/test/CodeGen/X86/atom-fixup-lea4.ll
new file mode 100644
index 00000000000..668574b968c
--- /dev/null
+++ b/llvm/test/CodeGen/X86/atom-fixup-lea4.ll
@@ -0,0 +1,23 @@
+; RUN: llc < %s -mcpu=atom -mtriple=x86_64-linux
+
+%struct.ValueWrapper = type { double }
+%struct.ValueWrapper.6 = type { %struct.ValueWrapper.7 }
+%struct.ValueWrapper.7 = type { %struct.ValueWrapper.8 }
+%struct.ValueWrapper.8 = type { %struct.ValueWrapper }
+
+; Function Attrs: uwtable
+define linkonce_odr void @_ZN12ValueWrapperIS_IS_IS_IdEEEEC2Ev(%struct.ValueWrapper.6* %this) unnamed_addr #0 align 2 {
+entry:
+ %this.addr = alloca %struct.ValueWrapper.6*, align 8
+ store %struct.ValueWrapper.6* %this, %struct.ValueWrapper.6** %this.addr, align 8
+ %this1 = load %struct.ValueWrapper.6** %this.addr
+ %value = getelementptr inbounds %struct.ValueWrapper.6* %this1, i32 0, i32 0
+ call void @_ZN12ValueWrapperIS_IS_IdEEEC2Ev(%struct.ValueWrapper.7* %value)
+ ret void
+}
+
+; Function Attrs: uwtable
+declare void @_ZN12ValueWrapperIS_IS_IdEEEC2Ev(%struct.ValueWrapper.7*) unnamed_addr #0 align 2
+
+attributes #0 = { uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
+
OpenPOWER on IntegriCloud