From 685090f5988a03da1a515493bad1e592d26b9956 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 17 Apr 2011 17:12:08 +0000 Subject: fix an oversight which caused us to compile the testcase (and other less trivial things) into a dummy lea. Before we generated: _test: ## @test movq _G@GOTPCREL(%rip), %rax leaq (%rax), %rax ret now we produce: _test: ## @test movq _G@GOTPCREL(%rip), %rax ret This is part of rdar://9289558 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129662 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/fast-isel-x86-64.ll | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/CodeGen/X86/fast-isel-x86-64.ll') diff --git a/test/CodeGen/X86/fast-isel-x86-64.ll b/test/CodeGen/X86/fast-isel-x86-64.ll index 6137b48736..c0815aaff5 100644 --- a/test/CodeGen/X86/fast-isel-x86-64.ll +++ b/test/CodeGen/X86/fast-isel-x86-64.ll @@ -33,3 +33,15 @@ if.end: ; preds = %if.then, %entry ; CHECK: test2: ; CHECK: movq %rdi, -8(%rsp) ; CHECK: cmpq $42, -8(%rsp) + + + +@G = external global i32 +define i64 @test3() nounwind { + %A = ptrtoint i32* @G to i64 + ret i64 %A +} + +; CHECK: test3: +; CHECK: movq _G@GOTPCREL(%rip), %rax +; CHECK-NEXT: ret -- cgit v1.2.3