Convert several tests to use temporary files instead of redundantly
authorDan Gohman <gohman@apple.com>
Tue, 10 Jun 2008 00:36:41 +0000 (00:36 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 10 Jun 2008 00:36:41 +0000 (00:36 +0000)
executing the test commands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52163 91177308-0d34-0410-b5e6-96231b3b80d8

14 files changed:
test/CodeGen/X86/2006-04-27-ISelFoldingBug.ll
test/CodeGen/X86/2006-07-31-SingleRegClass.ll
test/CodeGen/X86/2006-11-17-IllegalMove.ll
test/CodeGen/X86/2007-01-13-StackPtrIndex.ll
test/CodeGen/X86/2008-04-28-CoalescerBug.ll
test/CodeGen/X86/nancvt.ll
test/CodeGen/X86/packed_struct.ll
test/CodeGen/X86/prefetch.ll
test/CodeGen/X86/sse-align-12.ll
test/CodeGen/X86/vec_insert-5.ll
test/CodeGen/X86/vec_logical.ll
test/CodeGen/X86/vec_return.ll
test/CodeGen/X86/vec_shuffle-12.ll
test/CodeGen/X86/vec_shuffle-13.ll

index 1a72a20a4f2b26e7c1f915640c23bc13deddc7f8..4a0b5c37e26172279be0a32018e315450adfd780 100644 (file)
@@ -1,9 +1,7 @@
 ; RUN: llvm-as < %s | \
-; RUN:   llc -march=x86 -mtriple=i686-apple-darwin8 -relocation-model=static | \
-; RUN:   grep {movl    _last} | count 1
-; RUN: llvm-as < %s | \
-; RUN:   llc -march=x86 -mtriple=i686-apple-darwin8 -relocation-model=static | \
-; RUN:   grep {cmpl.*_last} | count 1
+; RUN:   llc -march=x86 -mtriple=i686-apple-darwin8 -relocation-model=static > %t
+; RUN: grep {movl      _last} %t | count 1
+; RUN: grep {cmpl.*_last} %t | count 1
 
 @block = external global i8*            ; <i8**> [#uses=1]
 @last = external global i32             ; <i32*> [#uses=3]
index 561aff3307e1f0e6a837d526a4c773bc04b2be88..2a521ad73885be01d28598f7e035ee939f2d6322 100644 (file)
@@ -1,8 +1,7 @@
 ; PR850
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=att | \
-; RUN:   grep {movl 4(%eax),%ebp}
-; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=att | \
-; RUN:   grep {movl 0(%eax), %ebx}
+; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=att > %t
+; RUN: grep {movl 4(%eax),%ebp} %t
+; RUN: grep {movl 0(%eax), %ebx} %t
 
 define i32 @foo(i32 %__s.i.i, i32 %tmp5.i.i, i32 %tmp6.i.i, i32 %tmp7.i.i, i32 %tmp8.i.i) {
        %tmp9.i.i = call i32 asm sideeffect "push %ebp\0Apush %ebx\0Amovl 4($2),%ebp\0Amovl 0($2), %ebx\0Amovl $1,%eax\0Aint  $$0x80\0Apop  %ebx\0Apop %ebp", "={ax},i,0,{cx},{dx},{si},{di}"( i32 192, i32 %__s.i.i, i32 %tmp5.i.i, i32 %tmp6.i.i, i32 %tmp7.i.i, i32 %tmp8.i.i )              ; <i32> [#uses=1]
index 530927af9350757d82278043f4fbeee8a941fe82..57e200db76aa94b1aac14edbfcaafe609ef7a224 100644 (file)
@@ -1,7 +1,6 @@
-; RUN: llvm-as < %s | llc -march=x86-64 | \
-; RUN:   grep movb | count 2
-; RUN: llvm-as < %s | llc -march=x86-64 | \
-; RUN:   grep movzbw
+; RUN: llvm-as < %s | llc -march=x86-64 > %t
+; RUN: grep movb %t | count 2
+; RUN: grep movzbw %t
 
 
 define void @handle_vector_size_attribute() {
index a9ba7dfd324fe0a70ef6c14a44ee82a72c98cf6d..d1d0ea8457810c918c5c59f7483543280a72ab97 100644 (file)
@@ -1,5 +1,6 @@
-; RUN: llvm-as < %s | llc -march=x86-64 | grep leaq
-; RUN: llvm-as < %s | llc -march=x86-64 | not grep {,%rsp)}
+; RUN: llvm-as < %s | llc -march=x86-64 > %t
+; RUN: grep leaq %t
+; RUN: not grep {,%rsp)} %t
 ; PR1103
 
 target datalayout = "e-p:64:64"
index e970a4267dfa0b3bec3b3f15fc55ea6338c6fd78..f93ad9ae7151f6b8e105a60d092b01fd3609f501 100644 (file)
@@ -1,6 +1,7 @@
-; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin | grep movl | not grep {r\[abcd\]x}
-; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin | grep movl | not grep {r\[ds\]i}
-; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin | grep movl | not grep {r\[bs\]p}
+; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin | grep movl > %t
+; RUN: not grep {r\[abcd\]x} %t
+; RUN: not grep {r\[ds\]i} %t
+; RUN: not grep {r\[bs\]p} %t
 
        %struct.BITMAP = type { i16, i16, i32, i32, i32, i32, i32, i32, i8*, i8* }
        %struct.BltData = type { float, float, float, float }
index 9e5b73d6f320e3d427a813c07cfa2bb871d6308e..96cac0dc329aa305ae7dadca8811b048b4bdaf7a 100644 (file)
@@ -1,7 +1,8 @@
-; RUN: llvm-as < %s | opt -std-compile-opts | llc | grep 2147027116 | count 3
-; RUN: llvm-as < %s | opt -std-compile-opts | llc | grep 2147228864 | count 3
-; RUN: llvm-as < %s | opt -std-compile-opts | llc | grep 2146502828 | count 3
-; RUN: llvm-as < %s | opt -std-compile-opts | llc | grep 2143034560 | count 3
+; RUN: llvm-as < %s | opt -std-compile-opts | llc > %t
+; RUN: grep 2147027116 %t | count 3
+; RUN: grep 2147228864 %t | count 3
+; RUN: grep 2146502828 %t | count 3
+; RUN: grep 2143034560 %t | count 3
 ; Compile time conversions of NaNs.
 ; ModuleID = 'nan2.c'
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
index aea631896a8cd2bd97cbd7e783dbd284a2309267..2a781e7e546bed361ef79ef61b91c0cdb6fa7e7b 100644 (file)
@@ -1,8 +1,9 @@
-; RUN: llvm-as < %s | llc -march=x86 | grep foos+5
-; RUN: llvm-as < %s | llc -march=x86 | grep foos+1
-; RUN: llvm-as < %s | llc -march=x86 | grep foos+9
-; RUN: llvm-as < %s | llc -march=x86 | grep bara+19
-; RUN: llvm-as < %s | llc -march=x86 | grep bara+4
+; RUN: llvm-as < %s | llc -march=x86 > %t
+; RUN: grep foos+5 %t
+; RUN: grep foos+1 %t
+; RUN: grep foos+9 %t
+; RUN: grep bara+19 %t
+; RUN: grep bara+4 %t
 
 ; make sure we compute the correct offset for a packed structure
 
index 003ce33feceed50bef5a621703a7499da70fbea4..d6517f7ef5b13131b2f89f592357d983e81bb9a5 100644 (file)
@@ -1,7 +1,8 @@
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse | grep prefetchnta
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse | grep prefetcht0
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse | grep prefetcht1
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse | grep prefetcht2
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse > %t
+; RUN: grep prefetchnta %t
+; RUN: grep prefetcht0 %t
+; RUN: grep prefetcht1 %t
+; RUN: grep prefetcht2 %t
 
 define void @t(i8* %ptr) nounwind  {
 entry:
index a5016601db9f89ef93f4eec22bf97cec5de3e67b..297f1c458db91a024520b75611f2638d61db1443 100644 (file)
@@ -1,8 +1,9 @@
-; RUN: llvm-as < %s | llc -march=x86-64 | grep unpck | count 2
-; RUN: llvm-as < %s | llc -march=x86-64 | grep shuf | count 2
-; RUN: llvm-as < %s | llc -march=x86-64 | grep ps | count 4
-; RUN: llvm-as < %s | llc -march=x86-64 | grep pd | count 4
-; RUN: llvm-as < %s | llc -march=x86-64 | grep movup | count 4
+; RUN: llvm-as < %s | llc -march=x86-64 > %t
+; RUN: grep unpck %t | count 2
+; RUN: grep shuf %t | count 2
+; RUN: grep ps %t | count 4
+; RUN: grep pd %t | count 4
+; RUN: grep movup %t | count 4
 
 define <4 x float> @a(<4 x float>* %y) nounwind {
   %x = load <4 x float>* %y, align 4
index eaa523e6e573f382a7ac550b6d823bcbfb2e83a1..1a9768a98e6c0b23aedaad82f4cf2e29d8919855 100644 (file)
@@ -1,7 +1,8 @@
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep psllq  | grep 32
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pslldq | grep 12
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep psrldq | grep 8
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep psrldq | grep 12
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 > %t
+; RUN: grep psllq %t | grep 32
+; RUN: grep pslldq %t | grep 12
+; RUN: grep psrldq %t | grep 8
+; RUN: grep psrldq %t | grep 12
 
 define void  @t1(i32 %a, <1 x i64>* %P) nounwind {
        %tmp12 = shl i32 %a, 12
index cf45a4a67091f034b5f12df5b9bc734b4c6b9c16..6e03afb94a806f6af4e47b444b2b46f0449a9624 100644 (file)
@@ -1,7 +1,7 @@
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep xorps | count 2
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep andnps
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movaps | count 2
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 > %t
+; RUN: grep xorps %t | count 2
+; RUN: grep andnps %t
+; RUN: grep movaps %t | count 2
 
 define void @t(<4 x float> %A) {
        %tmp1277 = sub <4 x float> < float -0.000000e+00, float -0.000000e+00, float -0.000000e+00, float -0.000000e+00 >, %A
index ed1a15c8607b4cfe123896bb0e37dea026e9b94b..106966fd52128f08439026b89abf9dcd231ec0c9 100644 (file)
@@ -1,7 +1,7 @@
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep xorps | count 1
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movaps | count 1
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep shuf
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 > %t
+; RUN: grep xorps %t | count 1
+; RUN: grep movaps %t | count 1
+; RUN: not grep shuf %t
 
 define <2 x double> @test() {
        ret <2 x double> zeroinitializer
index 70c6a56d73413c280ac5359ecd7ca4f8e0a9404c..3f49b02543bbffb2812d0cb348ddd4f206976b1b 100644 (file)
@@ -1,9 +1,9 @@
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep punpck
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pextrw | count 4
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pinsrw | count 6
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pshuflw | count 3
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pshufhw | count 2
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 > %t
+; RUN: not grep punpck %t
+; RUN: grep pextrw %t | count 4
+; RUN: grep pinsrw %t | count 6
+; RUN: grep pshuflw %t | count 3
+; RUN: grep pshufhw %t | count 2
 
 define <8 x i16> @t1(<8 x i16>* %A, <8 x i16>* %B) {
        %tmp1 = load <8 x i16>* %A
index f889e8f279ecc50daebab24be33653fdebd85b38..4511e9563a511f406c62d8542997d4e7505050c3 100644 (file)
@@ -1,9 +1,9 @@
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movlhps | count 1
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movss | count 1
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pshufd | count 1
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pshuflw | count 1
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pshufhw | count 1
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 > %t
+; RUN: grep movlhps %t | count 1
+; RUN: grep movss %t | count 1
+; RUN: grep pshufd %t | count 1
+; RUN: grep pshuflw %t | count 1
+; RUN: grep pshufhw %t | count 1
 
 define <8 x i16> @t1(<8 x i16> %A, <8 x i16> %B) nounwind {
        %tmp = shufflevector <8 x i16> %A, <8 x i16> %B, <8 x i32> < i32 8, i32 9, i32 0, i32 1, i32 10, i32 11, i32 2, i32 3 >