diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2010-04-12 23:07:17 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2010-04-12 23:07:17 +0000 |
| commit | 9286ea312b3b95e93ee27c70b9ed40204afa8c7c (patch) | |
| tree | f782583e82d64cdb2579e3ab4d7aaa4b9287bdbb /test/CodeGen | |
| parent | 4d2e75e3db48b6717a0b1dd655211d6e52fd25d3 (diff) | |
| download | external_llvm-9286ea312b3b95e93ee27c70b9ed40204afa8c7c.zip external_llvm-9286ea312b3b95e93ee27c70b9ed40204afa8c7c.tar.gz external_llvm-9286ea312b3b95e93ee27c70b9ed40204afa8c7c.tar.bz2 | |
Use .set expression for x86 pic jump table reference to reduce assembly relocation. rdar://7738756
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101085 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
| -rw-r--r-- | test/CodeGen/X86/pic_jumptable.ll | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/CodeGen/X86/pic_jumptable.ll b/test/CodeGen/X86/pic_jumptable.ll index b3750c1..aad0a61 100644 --- a/test/CodeGen/X86/pic_jumptable.ll +++ b/test/CodeGen/X86/pic_jumptable.ll @@ -1,13 +1,18 @@ ; RUN: llc < %s -relocation-model=pic -mtriple=i386-linux-gnu -asm-verbose=false | not grep -F .text -; RUN: llc < %s -relocation-model=pic -mtriple=i686-apple-darwin -asm-verbose=false | not grep lea -; RUN: llc < %s -relocation-model=pic -mtriple=i686-apple-darwin -asm-verbose=false | grep add | count 2 +; RUN: llc < %s -relocation-model=pic -mtriple=i686-apple-darwin -asm-verbose=false | FileCheck %s ; RUN: llc < %s -mtriple=x86_64-apple-darwin | not grep 'lJTI' ; rdar://6971437 +; rdar://7738756 declare void @_Z3bari(i32) define linkonce void @_Z3fooILi1EEvi(i32 %Y) nounwind { entry: +; CHECK: L1$pb +; CHECK-NOT: leal +; CHECK: Ltmp0 = LJTI1_0-L1$pb +; CHECK-NEXT: addl Ltmp0(%eax,%ecx,4) +; CHECK-NEXT: jmpl *%eax %Y_addr = alloca i32 ; <i32*> [#uses=2] %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] store i32 %Y, i32* %Y_addr |
