merge a target-specific add test into x86 directory.
authorChris Lattner <sabre@nondot.org>
Tue, 9 Feb 2010 06:35:50 +0000 (06:35 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 9 Feb 2010 06:35:50 +0000 (06:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95654 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/Generic/addc-fold2.ll [deleted file]
test/CodeGen/X86/add.ll

diff --git a/test/CodeGen/Generic/addc-fold2.ll b/test/CodeGen/Generic/addc-fold2.ll
deleted file mode 100644 (file)
index 34f5ac1..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-; RUN: llc < %s -march=x86 | grep add
-; RUN: llc < %s -march=x86 | not grep adc
-
-define i64 @test(i64 %A, i32 %B) {
-        %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
-}
-
index d8390776f918cf4d26c04d3bfefa1a1bc72b9cb4..3991a6849f3ed3d1d2f5601eacc86fa585173b88 100644 (file)
@@ -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
+}
+