Convert scripts from using explicit control flow to use the new grep-not script

llvm-svn: 6955
diff --git a/llvm/test/Regression/Transforms/InstCombine/2002-05-14-SubFailure.ll b/llvm/test/Regression/Transforms/InstCombine/2002-05-14-SubFailure.ll
index 4141c10..dd859c5 100644
--- a/llvm/test/Regression/Transforms/InstCombine/2002-05-14-SubFailure.ll
+++ b/llvm/test/Regression/Transforms/InstCombine/2002-05-14-SubFailure.ll
@@ -1,10 +1,7 @@
 ; Instcombine was missing a test that caused it to make illegal transformations
 ; sometimes.  In this case, it transforms the sub into an add:
 ; RUN: echo foo
-; RUN: if as < %s | opt -instcombine | dis | grep add
-; RUN: then exit 1
-; RUN: else exit 0
-; RUN: fi
+; RUN: as < %s | opt -instcombine | dis | grep-not add
 ;
 
 
diff --git a/llvm/test/Regression/Transforms/InstCombine/2002-12-05-MissedConstProp.ll b/llvm/test/Regression/Transforms/InstCombine/2002-12-05-MissedConstProp.ll
index c8e2aca..96c6924 100644
--- a/llvm/test/Regression/Transforms/InstCombine/2002-12-05-MissedConstProp.ll
+++ b/llvm/test/Regression/Transforms/InstCombine/2002-12-05-MissedConstProp.ll
@@ -1,7 +1,4 @@
-; RUN: if as < %s | opt -instcombine | dis | grep add
-; RUN: then exit 1
-; RUN: else exit 0
-; RUN: fi
+; RUN: as < %s | opt -instcombine | dis | grep-not add
 
 int %test(int %A) {
   %A.neg = sub int 0, %A
diff --git a/llvm/test/Regression/Transforms/InstCombine/add.ll b/llvm/test/Regression/Transforms/InstCombine/add.ll
index d3e358d..b2850d3 100644
--- a/llvm/test/Regression/Transforms/InstCombine/add.ll
+++ b/llvm/test/Regression/Transforms/InstCombine/add.ll
@@ -3,10 +3,7 @@
 ; This also tests that a subtract with a constant is properly converted
 ; to a add w/negative constant
 
-; RUN: if as < %s | opt -instcombine -die | dis | grep add
-; RUN: then exit 1
-; RUN: else exit 0
-; RUN: fi
+; RUN: as < %s | opt -instcombine -die | dis | grep-not add
 
 implementation
 
diff --git a/llvm/test/Regression/Transforms/InstCombine/and.ll b/llvm/test/Regression/Transforms/InstCombine/and.ll
index 269b33c..a06fc33 100644
--- a/llvm/test/Regression/Transforms/InstCombine/and.ll
+++ b/llvm/test/Regression/Transforms/InstCombine/and.ll
@@ -1,10 +1,7 @@
 ; This test makes sure that these instructions are properly eliminated.
 ;
 
-; RUN: if as < %s | opt -instcombine | dis | grep and
-; RUN: then exit 1
-; RUN: else exit 0
-; RUN: fi
+; RUN: as < %s | opt -instcombine | dis | grep-not and
 
 implementation
 
diff --git a/llvm/test/Regression/Transforms/InstCombine/call.ll b/llvm/test/Regression/Transforms/InstCombine/call.ll
index 39b82bf..665a09c 100644
--- a/llvm/test/Regression/Transforms/InstCombine/call.ll
+++ b/llvm/test/Regression/Transforms/InstCombine/call.ll
@@ -1,7 +1,4 @@
-; RUN: if as < %s | opt -instcombine -die | dis | grep call | grep cast
-; RUN: then exit 1
-; RUN: else exit 0
-; RUN: fi
+; RUN: as < %s | opt -instcombine -die | dis | grep call | grep-not cast
 
 implementation
 
diff --git a/llvm/test/Regression/Transforms/InstCombine/cast-set.ll b/llvm/test/Regression/Transforms/InstCombine/cast-set.ll
index fb634f8..ef3821a 100644
--- a/llvm/test/Regression/Transforms/InstCombine/cast-set.ll
+++ b/llvm/test/Regression/Transforms/InstCombine/cast-set.ll
@@ -3,10 +3,7 @@
 ; slow.  Might it be better to make there be an instcombine prepass before
 ; level raise that takes care of the obvious stuff?
 
-; RUN: if as < %s | opt -instcombine | dis | grep cast
-; RUN: then exit 1
-; RUN: else exit 0
-; RUN: fi
+; RUN: as < %s | opt -instcombine | dis | grep-not cast
 
 bool %test1(int %X) {
 	%A = cast int %X to uint
diff --git a/llvm/test/Regression/Transforms/InstCombine/cast.ll b/llvm/test/Regression/Transforms/InstCombine/cast.ll
index d197eaf..32556c0 100644
--- a/llvm/test/Regression/Transforms/InstCombine/cast.ll
+++ b/llvm/test/Regression/Transforms/InstCombine/cast.ll
@@ -1,9 +1,6 @@
 ; Tests to make sure elimination of casts is working correctly
 
-; RUN: if as < %s | opt -instcombine -die | dis | grep '%c' | grep cast
-; RUN: then exit 1
-; RUN: else exit 0
-; RUN: fi
+; RUN: as < %s | opt -instcombine -die | dis | grep '%c' | grep-not cast
 
 implementation
 
diff --git a/llvm/test/Regression/Transforms/InstCombine/div.ll b/llvm/test/Regression/Transforms/InstCombine/div.ll
index 2bcd452..913d3cc 100644
--- a/llvm/test/Regression/Transforms/InstCombine/div.ll
+++ b/llvm/test/Regression/Transforms/InstCombine/div.ll
@@ -1,10 +1,7 @@
 ; This test makes sure that div instructions are properly eliminated.
 ;
 
-; RUN: if as < %s | opt -instcombine | dis | grep div
-; RUN: then exit 1
-; RUN: else exit 0
-; RUN: fi
+; RUN: as < %s | opt -instcombine | dis | grep-not div
 
 implementation
 
diff --git a/llvm/test/Regression/Transforms/InstCombine/getelementptr.ll b/llvm/test/Regression/Transforms/InstCombine/getelementptr.ll
index 52c1ba6..011554c 100644
--- a/llvm/test/Regression/Transforms/InstCombine/getelementptr.ll
+++ b/llvm/test/Regression/Transforms/InstCombine/getelementptr.ll
@@ -1,9 +1,6 @@
 ; The %A getelementptr instruction should be eliminated here
 
-; RUN: if as < %s | opt -instcombine -die | dis | grep getelementptr | grep '%A '
-; RUN: then exit 1
-; RUN: else exit 0
-; RUN: fi
+; RUN: as < %s | opt -instcombine -die | dis | grep getelementptr | grep-not '%A '
 
 %Global = constant [10 x sbyte] c"helloworld"
 
diff --git a/llvm/test/Regression/Transforms/InstCombine/load.ll b/llvm/test/Regression/Transforms/InstCombine/load.ll
index 47da1ff..f80e02e 100644
--- a/llvm/test/Regression/Transforms/InstCombine/load.ll
+++ b/llvm/test/Regression/Transforms/InstCombine/load.ll
@@ -1,10 +1,7 @@
 ; This test makes sure that these instructions are properly eliminated.
 ;
 
-; RUN: if as < %s | opt -instcombine | dis | grep load
-; RUN: then exit 1
-; RUN: else exit 0
-; RUN: fi
+; RUN: as < %s | opt -instcombine | dis | grep-not load
 
 %X = constant int 42
 %Y = constant [2 x { int, float }] [ { int, float } { int 12, float 1.0 }, 
diff --git a/llvm/test/Regression/Transforms/InstCombine/not.ll b/llvm/test/Regression/Transforms/InstCombine/not.ll
index 24d8f69..0928ce7 100644
--- a/llvm/test/Regression/Transforms/InstCombine/not.ll
+++ b/llvm/test/Regression/Transforms/InstCombine/not.ll
@@ -1,10 +1,7 @@
 ; This test makes sure that these instructions are properly eliminated.
 ;
 
-; RUN: if as < %s | opt -instcombine -die | dis | grep xor
-; RUN: then exit 1
-; RUN: else exit 0
-; RUN: fi
+; RUN: as < %s | opt -instcombine -die | dis | grep-not xor
 
 implementation
 
diff --git a/llvm/test/Regression/Transforms/InstCombine/or.ll b/llvm/test/Regression/Transforms/InstCombine/or.ll
index e01bb11..09141a3 100644
--- a/llvm/test/Regression/Transforms/InstCombine/or.ll
+++ b/llvm/test/Regression/Transforms/InstCombine/or.ll
@@ -1,10 +1,7 @@
 ; This test makes sure that these instructions are properly eliminated.
 ;
 
-; RUN: if as < %s | opt -instcombine | dis | grep -v '%OROK = or' | grep or\ 
-; RUN: then exit 1
-; RUN: else exit 0
-; RUN: fi
+; RUN: as < %s | opt -instcombine | dis | grep -v '%OROK = or' | grep-not 'or '
 
 implementation
 
diff --git a/llvm/test/Regression/Transforms/InstCombine/phi.ll b/llvm/test/Regression/Transforms/InstCombine/phi.ll
index 52d9157..f867bdf 100644
--- a/llvm/test/Regression/Transforms/InstCombine/phi.ll
+++ b/llvm/test/Regression/Transforms/InstCombine/phi.ll
@@ -1,10 +1,7 @@
 ; This test makes sure that these instructions are properly eliminated.
 ;
 
-; RUN: if as < %s | opt -instcombine -die | dis | grep phi
-; RUN: then exit 1
-; RUN: else exit 0
-; RUN: fi
+; RUN: as < %s | opt -instcombine -die | dis | grep-not phi
 
 implementation
 
diff --git a/llvm/test/Regression/Transforms/InstCombine/pow.ll b/llvm/test/Regression/Transforms/InstCombine/pow.ll
index 9a3ca7e..66027cd 100644
--- a/llvm/test/Regression/Transforms/InstCombine/pow.ll
+++ b/llvm/test/Regression/Transforms/InstCombine/pow.ll
@@ -2,10 +2,7 @@
 ;
 ; Equivalent to: http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01786.html
 
-; RUN: if as < %s | opt -instcombine | dis | grep 'call double %pow'
-; RUN: then exit 1
-; RUN: else exit 0
-; RUN: fi
+; RUN: as < %s | opt -instcombine | dis | grep-not 'call double %pow'
 
 declare double %pow(double, double)
 
diff --git a/llvm/test/Regression/Transforms/InstCombine/rem.ll b/llvm/test/Regression/Transforms/InstCombine/rem.ll
index ddc1c4b..09300a5 100644
--- a/llvm/test/Regression/Transforms/InstCombine/rem.ll
+++ b/llvm/test/Regression/Transforms/InstCombine/rem.ll
@@ -1,10 +1,7 @@
 ; This test makes sure that these instructions are properly eliminated.
 ;
 
-; RUN: if as < %s | opt -instcombine | dis | grep rem
-; RUN: then exit 1
-; RUN: else exit 0
-; RUN: fi
+; RUN: as < %s | opt -instcombine | dis | grep-not rem
 
 implementation
 
diff --git a/llvm/test/Regression/Transforms/InstCombine/set.ll b/llvm/test/Regression/Transforms/InstCombine/set.ll
index f97a2b6..760e14d 100644
--- a/llvm/test/Regression/Transforms/InstCombine/set.ll
+++ b/llvm/test/Regression/Transforms/InstCombine/set.ll
@@ -1,10 +1,7 @@
 ; This test makes sure that these instructions are properly eliminated.
 ;
 
-; RUN: if as < %s | opt -instcombine | dis | grep set
-; RUN: then exit 1
-; RUN: else exit 0
-; RUN: fi
+; RUN: as < %s | opt -instcombine | dis | grep-not set
 
 %X = uninitialized global int
 
diff --git a/llvm/test/Regression/Transforms/InstCombine/setcc-strength-reduce.ll b/llvm/test/Regression/Transforms/InstCombine/setcc-strength-reduce.ll
index 375dac6..9051d03 100644
--- a/llvm/test/Regression/Transforms/InstCombine/setcc-strength-reduce.ll
+++ b/llvm/test/Regression/Transforms/InstCombine/setcc-strength-reduce.ll
@@ -3,10 +3,7 @@
 ; into equivalent setne,eq instructions.
 ;
 
-; RUN: if as < %s | opt -instcombine | dis | grep -v seteq | grep -v setne | grep set
-; RUN: then exit 1
-; RUN: else exit 0
-; RUN: fi
+; RUN: as < %s | opt -instcombine | dis | grep -v seteq | grep -v setne | grep-not set
 
 bool "test1"(uint %A) {
 	%B = setge uint %A, 1   ; setne %A, 0
diff --git a/llvm/test/Regression/Transforms/InstCombine/shift.ll b/llvm/test/Regression/Transforms/InstCombine/shift.ll
index 66a0817..67e2827 100644
--- a/llvm/test/Regression/Transforms/InstCombine/shift.ll
+++ b/llvm/test/Regression/Transforms/InstCombine/shift.ll
@@ -1,10 +1,7 @@
 ; This test makes sure that these instructions are properly eliminated.
 ;
 
-; RUN: if as < %s | opt -instcombine | dis | grep sh
-; RUN: then exit 1
-; RUN: else exit 0
-; RUN: fi
+; RUN: as < %s | opt -instcombine | dis | grep-not sh
 
 implementation
 
diff --git a/llvm/test/Regression/Transforms/InstCombine/sub.ll b/llvm/test/Regression/Transforms/InstCombine/sub.ll
index 184886c..4bd9be6 100644
--- a/llvm/test/Regression/Transforms/InstCombine/sub.ll
+++ b/llvm/test/Regression/Transforms/InstCombine/sub.ll
@@ -1,10 +1,7 @@
 ; This test makes sure that these instructions are properly eliminated.
 ;
 
-; RUN: if as < %s | opt -instcombine -die | dis | grep sub | grep -v 'sub int %Cok, %Bok'
-; RUN: then exit 1
-; RUN: else exit 0
-; RUN: fi
+; RUN: as < %s | opt -instcombine -die | dis | grep sub | grep-not -v 'sub int %Cok, %Bok'
 
 implementation