diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2011-03-16 13:53:07 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2011-03-16 13:53:07 +0000 |
commit | bfc4c983a6c523b95972cf43e1b202f8eb1ebfd2 (patch) | |
tree | b26b48b690988e6a71d1177dd7960280820e179e /test/CodeGen/X86/lea-3.ll | |
parent | 37947c6bad087605f07d73a0a418c3781e2eaaa9 (diff) | |
download | external_llvm-bfc4c983a6c523b95972cf43e1b202f8eb1ebfd2.zip external_llvm-bfc4c983a6c523b95972cf43e1b202f8eb1ebfd2.tar.gz external_llvm-bfc4c983a6c523b95972cf43e1b202f8eb1ebfd2.tar.bz2 |
test/CodeGen/X86: FileCheck-ize and add actions for x86_64-linux and x86_64-win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127734 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/lea-3.ll')
-rw-r--r-- | test/CodeGen/X86/lea-3.ll | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/test/CodeGen/X86/lea-3.ll b/test/CodeGen/X86/lea-3.ll index 44413d6..040c5c2 100644 --- a/test/CodeGen/X86/lea-3.ll +++ b/test/CodeGen/X86/lea-3.ll @@ -1,16 +1,19 @@ -; RUN: llc < %s -march=x86-64 | grep {leal (%rdi,%rdi,2), %eax} -define i32 @test(i32 %a) { - %tmp2 = mul i32 %a, 3 ; <i32> [#uses=1] - ret i32 %tmp2 -} +; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s +; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s -; RUN: llc < %s -march=x86-64 | grep {leaq (,%rdi,4), %rax} +; CHECK: leaq (,[[A0:%rdi|%rcx]],4), %rax define i64 @test2(i64 %a) { %tmp2 = shl i64 %a, 2 %tmp3 = or i64 %tmp2, %a ret i64 %tmp3 } +; CHECK: leal ([[A0]],[[A0]],2), %eax +define i32 @test(i32 %a) { + %tmp2 = mul i32 %a, 3 ; <i32> [#uses=1] + ret i32 %tmp2 +} + ;; TODO! LEA instead of shift + copy. define i64 @test3(i64 %a) { %tmp2 = shl i64 %a, 3 |