Convert several tests to use temporary files instead of redundantly
executing the test commands.

llvm-svn: 52163
diff --git a/llvm/test/CodeGen/X86/prefetch.ll b/llvm/test/CodeGen/X86/prefetch.ll
index 003ce33..d6517f7 100644
--- a/llvm/test/CodeGen/X86/prefetch.ll
+++ b/llvm/test/CodeGen/X86/prefetch.ll
@@ -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: