diff options
author | Chris Lattner <sabre@nondot.org> | 2011-04-17 17:12:08 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-04-17 17:12:08 +0000 |
commit | 685090f5988a03da1a515493bad1e592d26b9956 (patch) | |
tree | 21bd6876476c43f19265d6e2ff59b4404c754066 /test/CodeGen | |
parent | dceb52a01b21425e3b4611957ec4988b991ec5a8 (diff) | |
download | external_llvm-685090f5988a03da1a515493bad1e592d26b9956.zip external_llvm-685090f5988a03da1a515493bad1e592d26b9956.tar.gz external_llvm-685090f5988a03da1a515493bad1e592d26b9956.tar.bz2 |
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')
-rw-r--r-- | test/CodeGen/X86/fast-isel-x86-64.ll | 12 |
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 6137b48..c0815aa 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 |