[llvm-commits] [llvm] r95654 - in /llvm/trunk/test/CodeGen: Generic/addc-fold2.ll X86/add.ll
Chris Lattner
sabre at nondot.org
Mon Feb 8 22:35:50 PST 2010
Author: lattner
Date: Tue Feb 9 00:35:50 2010
New Revision: 95654
URL: http://llvm.org/viewvc/llvm-project?rev=95654&view=rev
Log:
merge a target-specific add test into x86 directory.
Removed:
llvm/trunk/test/CodeGen/Generic/addc-fold2.ll
Modified:
llvm/trunk/test/CodeGen/X86/add.ll
Removed: llvm/trunk/test/CodeGen/Generic/addc-fold2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/addc-fold2.ll?rev=95653&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/Generic/addc-fold2.ll (original)
+++ llvm/trunk/test/CodeGen/Generic/addc-fold2.ll (removed)
@@ -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
-}
-
Modified: llvm/trunk/test/CodeGen/X86/add.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/add.ll?rev=95654&r1=95653&r2=95654&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/add.ll (original)
+++ llvm/trunk/test/CodeGen/X86/add.ll Tue Feb 9 00:35:50 2010
@@ -72,3 +72,23 @@
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
+}
+
More information about the llvm-commits
mailing list