summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/fast-isel-x86-64.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-04-17 17:12:08 +0000
committerChris Lattner <sabre@nondot.org>2011-04-17 17:12:08 +0000
commit685090f5988a03da1a515493bad1e592d26b9956 (patch)
tree21bd6876476c43f19265d6e2ff59b4404c754066 /test/CodeGen/X86/fast-isel-x86-64.ll
parentdceb52a01b21425e3b4611957ec4988b991ec5a8 (diff)
downloadllvm-685090f5988a03da1a515493bad1e592d26b9956.tar.gz
llvm-685090f5988a03da1a515493bad1e592d26b9956.tar.bz2
llvm-685090f5988a03da1a515493bad1e592d26b9956.tar.xz
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
Diffstat (limited to 'test/CodeGen/X86/fast-isel-x86-64.ll')
-rw-r--r--test/CodeGen/X86/fast-isel-x86-64.ll12
1 files changed, 12 insertions, 0 deletions
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