summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/add.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-09 06:35:50 +0000
committerChris Lattner <sabre@nondot.org>2010-02-09 06:35:50 +0000
commitb00cd1c89905cb58ff2c58f17e865c33c2d47ff7 (patch)
tree5e7222ae30c843fc5080e3a37ba1be7ade0d3351 /test/CodeGen/X86/add.ll
parent7816239985579e5c8da2db6d0bb18384f2634c23 (diff)
downloadllvm-b00cd1c89905cb58ff2c58f17e865c33c2d47ff7.tar.gz
llvm-b00cd1c89905cb58ff2c58f17e865c33c2d47ff7.tar.bz2
llvm-b00cd1c89905cb58ff2c58f17e865c33c2d47ff7.tar.xz
merge a target-specific add test into x86 directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95654 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/add.ll')
-rw-r--r--test/CodeGen/X86/add.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CodeGen/X86/add.ll b/test/CodeGen/X86/add.ll
index d8390776f9..3991a6849f 100644
--- a/test/CodeGen/X86/add.ll
+++ b/test/CodeGen/X86/add.ll
@@ -72,3 +72,23 @@ carry:
declare {i32, i1} @llvm.sadd.with.overflow.i32(i32, i32)
declare {i32, i1} @llvm.uadd.with.overflow.i32(i32, i32)
+
+
+define i64 @test6(i64 %A, i32 %B) nounwind {
+ %tmp12 = zext i32 %B to i64 ; <i64> [#uses=1]
+ %tmp3 = shl i64 %tmp12, 32 ; <i64> [#uses=1]
+ %tmp5 = add i64 %tmp3, %A ; <i64> [#uses=1]
+ ret i64 %tmp5
+
+; X32: test6:
+; X32: movl 12(%esp), %edx
+; X32-NEXT: addl 8(%esp), %edx
+; X32-NEXT: movl 4(%esp), %eax
+; X32-NEXT: ret
+
+; X64: test6:
+; X64: shlq $32, %rsi
+; X64: leaq (%rsi,%rdi), %rax
+; X64: ret
+}
+