[llvm-commits] [llvm] r127734 - in /llvm/trunk/test/CodeGen/X86: 2007-01-08-X86-64-Pointer.ll 2007-07-18-Vector-Extract.ll avoid-lea-scale2.ll convert-2-addr-3-addr-inc64.ll i64-mem-copy.ll lea-3.ll mmx-copy-gprs.ll vec_set-8.ll vec_shuffle-17.ll x86-64-malloc.ll

NAKAMURA Takumi geek4civic at gmail.com
Wed Mar 16 06:53:08 PDT 2011


Author: chapuni
Date: Wed Mar 16 08:53:07 2011
New Revision: 127734

URL: http://llvm.org/viewvc/llvm-project?rev=127734&view=rev
Log:
test/CodeGen/X86: FileCheck-ize and add actions for x86_64-linux and x86_64-win32.

Modified:
    llvm/trunk/test/CodeGen/X86/2007-01-08-X86-64-Pointer.ll
    llvm/trunk/test/CodeGen/X86/2007-07-18-Vector-Extract.ll
    llvm/trunk/test/CodeGen/X86/avoid-lea-scale2.ll
    llvm/trunk/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll
    llvm/trunk/test/CodeGen/X86/i64-mem-copy.ll
    llvm/trunk/test/CodeGen/X86/lea-3.ll
    llvm/trunk/test/CodeGen/X86/mmx-copy-gprs.ll
    llvm/trunk/test/CodeGen/X86/vec_set-8.ll
    llvm/trunk/test/CodeGen/X86/vec_shuffle-17.ll
    llvm/trunk/test/CodeGen/X86/x86-64-malloc.ll

Modified: llvm/trunk/test/CodeGen/X86/2007-01-08-X86-64-Pointer.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2007-01-08-X86-64-Pointer.ll?rev=127734&r1=127733&r2=127734&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2007-01-08-X86-64-Pointer.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2007-01-08-X86-64-Pointer.ll Wed Mar 16 08:53:07 2011
@@ -1,5 +1,8 @@
-; RUN: llc %s -o - -march=x86-64 | grep {(%rdi,%rax,8)}
-; RUN: llc %s -o - -march=x86-64 | not grep {addq.*8}
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s
+; CHECK-NOT: {{addq.*8}}
+; CHECK:     ({{%rdi|%rcx}},%rax,8)
+; CHECK-NOT: {{addq.*8}}
 
 define void @foo(double* %y) nounwind {
 entry:

Modified: llvm/trunk/test/CodeGen/X86/2007-07-18-Vector-Extract.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2007-07-18-Vector-Extract.ll?rev=127734&r1=127733&r2=127734&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2007-07-18-Vector-Extract.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2007-07-18-Vector-Extract.ll Wed Mar 16 08:53:07 2011
@@ -1,5 +1,7 @@
-; RUN: llc < %s -march=x86-64 -mattr=+sse | grep {movq	(%rdi), %rax}
-; RUN: llc < %s -march=x86-64 -mattr=+sse | grep {movq	8(%rdi), %rax}
+; RUN: llc < %s -mtriple=x86_64-linux -mattr=+sse | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-win32 -mattr=+sse | FileCheck %s
+; CHECK: movq ([[A0:%rdi|%rcx]]), %rax
+; CHECK: movq 8([[A0]]), %rax
 define i64 @foo_0(<2 x i64>* %val) {
 entry:
         %val12 = getelementptr <2 x i64>* %val, i32 0, i32 0            ; <i64*> [#uses=1]

Modified: llvm/trunk/test/CodeGen/X86/avoid-lea-scale2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avoid-lea-scale2.ll?rev=127734&r1=127733&r2=127734&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/avoid-lea-scale2.ll (original)
+++ llvm/trunk/test/CodeGen/X86/avoid-lea-scale2.ll Wed Mar 16 08:53:07 2011
@@ -1,4 +1,6 @@
-; RUN: llc < %s -march=x86-64 | grep {leal.*-2(\[%\]rdi,\[%\]rdi)}
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s
+; CHECK: leal -2({{%rdi,%rdi|%rcx,%rcx}})
 
 define i32 @foo(i32 %x) nounwind readnone {
   %t0 = shl i32 %x, 1

Modified: llvm/trunk/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll?rev=127734&r1=127733&r2=127734&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll (original)
+++ llvm/trunk/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll Wed Mar 16 08:53:07 2011
@@ -1,6 +1,10 @@
-; RUN: llc < %s -march=x86-64 -o %t -stats -info-output-file - | \
-; RUN:   grep {asm-printer} | grep {Number of machine instrs printed} | grep 9
-; RUN: grep {leal	1(\%rsi),} %t
+; RUN: llc < %s -mtriple=x86_64-linux -o /dev/null -stats |& FileCheck %s -check-prefix=STATS
+; RUN: llc < %s -mtriple=x86_64-win32 -o /dev/null -stats |& FileCheck %s -check-prefix=STATS
+; STATS: 9 asm-printer
+
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s
+; CHECK: leal 1({{%rsi|%rdx}}),
 
 define fastcc zeroext i8 @fullGtU(i32 %i1, i32 %i2, i8* %ptr) nounwind optsize {
 entry:

Modified: llvm/trunk/test/CodeGen/X86/i64-mem-copy.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/i64-mem-copy.ll?rev=127734&r1=127733&r2=127734&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/i64-mem-copy.ll (original)
+++ llvm/trunk/test/CodeGen/X86/i64-mem-copy.ll Wed Mar 16 08:53:07 2011
@@ -1,5 +1,9 @@
-; RUN: llc < %s -march=x86-64           | grep {movq.*(%rsi), %rax}
-; RUN: llc < %s -march=x86 -mattr=+sse2 | grep {movsd.*(%eax),}
+; RUN: llc < %s -mtriple=x86_64-linux   | FileCheck %s -check-prefix=X64
+; RUN: llc < %s -mtriple=x86_64-win32   | FileCheck %s -check-prefix=X64
+; X64: movq ({{%rsi|%rdx}}), %r
+
+; RUN: llc < %s -march=x86 -mattr=+sse2 | FileCheck %s -check-prefix=X32
+; X32: movsd (%eax), %xmm
 
 ; Uses movsd to load / store i64 values if sse2 is available.
 

Modified: llvm/trunk/test/CodeGen/X86/lea-3.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/lea-3.ll?rev=127734&r1=127733&r2=127734&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/lea-3.ll (original)
+++ llvm/trunk/test/CodeGen/X86/lea-3.ll Wed Mar 16 08:53:07 2011
@@ -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

Modified: llvm/trunk/test/CodeGen/X86/mmx-copy-gprs.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/mmx-copy-gprs.ll?rev=127734&r1=127733&r2=127734&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/mmx-copy-gprs.ll (original)
+++ llvm/trunk/test/CodeGen/X86/mmx-copy-gprs.ll Wed Mar 16 08:53:07 2011
@@ -1,6 +1,10 @@
-; RUN: llc < %s -march=x86-64           | grep {movq.*(%rsi), %rax}
-; RUN: llc < %s -march=x86 -mattr=-sse2 | grep {movl.*4(%eax),}
-; RUN: llc < %s -march=x86 -mattr=+sse2 | grep {movsd.(%eax),}
+; RUN: llc < %s -mtriple=x86_64-linux   | FileCheck %s -check-prefix=X64
+; RUN: llc < %s -mtriple=x86_64-win32   | FileCheck %s -check-prefix=X64
+; X64: movq ({{%rsi|%rdx}}), %rax
+; RUN: llc < %s -march=x86 -mattr=-sse2 | FileCheck %s -check-prefix=X32
+; X32: movl 4(%eax),
+; RUN: llc < %s -march=x86 -mattr=+sse2 | FileCheck %s -check-prefix=XMM
+; XMM: movsd (%eax),
 
 ; This test should use GPRs to copy the mmx value, not MMX regs.  Using mmx regs,
 ; increases the places that need to use emms.

Modified: llvm/trunk/test/CodeGen/X86/vec_set-8.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vec_set-8.ll?rev=127734&r1=127733&r2=127734&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/vec_set-8.ll (original)
+++ llvm/trunk/test/CodeGen/X86/vec_set-8.ll Wed Mar 16 08:53:07 2011
@@ -1,5 +1,8 @@
-; RUN: llc < %s -march=x86-64 | not grep movsd
-; RUN: llc < %s -march=x86-64 | grep {movd.*%rdi,.*%xmm0}
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s
+; CHECK-NOT: movsd
+; CHECK: movd {{%rdi|%rcx}}, %xmm0
+; CHECK-NOT: movsd
 
 define <2 x i64> @test(i64 %i) nounwind  {
 entry:

Modified: llvm/trunk/test/CodeGen/X86/vec_shuffle-17.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vec_shuffle-17.ll?rev=127734&r1=127733&r2=127734&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/vec_shuffle-17.ll (original)
+++ llvm/trunk/test/CodeGen/X86/vec_shuffle-17.ll Wed Mar 16 08:53:07 2011
@@ -1,5 +1,8 @@
-; RUN: llc < %s -march=x86-64 | grep {movd.*%rdi, %xmm0}
-; RUN: llc < %s -march=x86-64 | not grep xor
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s
+; CHECK-NOT: xor
+; CHECK: movd {{%rdi|%rcx}}, %xmm0
+; CHECK-NOT: xor
 ; PR2108
 
 define <2 x i64> @doload64(i64 %x) nounwind  {

Modified: llvm/trunk/test/CodeGen/X86/x86-64-malloc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/x86-64-malloc.ll?rev=127734&r1=127733&r2=127734&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/x86-64-malloc.ll (original)
+++ llvm/trunk/test/CodeGen/X86/x86-64-malloc.ll Wed Mar 16 08:53:07 2011
@@ -1,4 +1,6 @@
-; RUN: llc < %s -march=x86-64 | grep {shll.*3, %edi}
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s
+; CHECK: shll $3, {{%edi|%ecx}}
 ; PR3829
 ; The generated code should multiply by 3 (sizeof i8*) as an i32,
 ; not as an i64!





More information about the llvm-commits mailing list