From d357e88740686e41e9f7fa208887336eb9af3c47 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 14 Jan 2011 06:14:33 +0000 Subject: [PATCH] revert my fastisel patch again which apparently still gives the llvm-gcc-i386-linux-selfhost buildbot heartburn... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123431 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86FastISel.cpp | 2 +- test/CodeGen/X86/fast-isel-gep.ll | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/lib/Target/X86/X86FastISel.cpp b/lib/Target/X86/X86FastISel.cpp index 9d42ac2e470..f29d127c85d 100644 --- a/lib/Target/X86/X86FastISel.cpp +++ b/lib/Target/X86/X86FastISel.cpp @@ -1933,7 +1933,7 @@ bool X86FastISel::TryToFoldLoad(MachineInstr *MI, unsigned OpNo, XII.foldMemoryOperandImpl(*FuncInfo.MF, MI, OpNo, AddrOps, Size, Alignment); if (Result == 0) return false; - FuncInfo.MBB->insert(FuncInfo.InsertPt, Result); + MI->getParent()->insert(MI, Result); MI->eraseFromParent(); return true; } diff --git a/test/CodeGen/X86/fast-isel-gep.ll b/test/CodeGen/X86/fast-isel-gep.ll index 622a1ff831d..577dd7223a4 100644 --- a/test/CodeGen/X86/fast-isel-gep.ll +++ b/test/CodeGen/X86/fast-isel-gep.ll @@ -70,20 +70,3 @@ entry: ; X64: test4: ; X64: 128(%r{{.*}},%r{{.*}},8) } - -; PR8961 - Make sure the sext for the GEP addressing comes before the load that -; is folded. -define i64 @test5(i8* %A, i32 %I, i64 %B) nounwind { - %v8 = getelementptr i8* %A, i32 %I - %v9 = bitcast i8* %v8 to i64* - %v10 = load i64* %v9 - %v11 = add i64 %B, %v10 - ret i64 %v11 -; X64: test5: -; X64: movslq %esi, %rax -; X64-NEXT: movq (%rdi,%rax), %rax -; X64-NEXT: addq %rdx, %rax -; X64-NEXT: ret -} - - -- 2.34.1