diff --git a/test/Transforms/InstCombine/2002-05-14-SubFailure.ll b/test/Transforms/InstCombine/2002-05-14-SubFailure.ll index 4141c10d705..dd859c51223 100644 --- a/test/Transforms/InstCombine/2002-05-14-SubFailure.ll +++ b/test/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/test/Transforms/InstCombine/2002-12-05-MissedConstProp.ll b/test/Transforms/InstCombine/2002-12-05-MissedConstProp.ll index c8e2aca71b0..96c692438e7 100644 --- a/test/Transforms/InstCombine/2002-12-05-MissedConstProp.ll +++ b/test/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/test/Transforms/InstCombine/add.ll b/test/Transforms/InstCombine/add.ll index d3e358d0ebb..b2850d37dec 100644 --- a/test/Transforms/InstCombine/add.ll +++ b/test/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/test/Transforms/InstCombine/and.ll b/test/Transforms/InstCombine/and.ll index 269b33c285a..a06fc33fced 100644 --- a/test/Transforms/InstCombine/and.ll +++ b/test/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/test/Transforms/InstCombine/call.ll b/test/Transforms/InstCombine/call.ll index 39b82bf3439..665a09c7639 100644 --- a/test/Transforms/InstCombine/call.ll +++ b/test/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/test/Transforms/InstCombine/cast-set.ll b/test/Transforms/InstCombine/cast-set.ll index fb634f893e4..ef3821a1f04 100644 --- a/test/Transforms/InstCombine/cast-set.ll +++ b/test/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/test/Transforms/InstCombine/cast.ll b/test/Transforms/InstCombine/cast.ll index d197eafb796..32556c070e8 100644 --- a/test/Transforms/InstCombine/cast.ll +++ b/test/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/test/Transforms/InstCombine/div.ll b/test/Transforms/InstCombine/div.ll index 2bcd452c23b..913d3ccef5c 100644 --- a/test/Transforms/InstCombine/div.ll +++ b/test/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/test/Transforms/InstCombine/getelementptr.ll b/test/Transforms/InstCombine/getelementptr.ll index 52c1ba6768c..011554cffd7 100644 --- a/test/Transforms/InstCombine/getelementptr.ll +++ b/test/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/test/Transforms/InstCombine/load.ll b/test/Transforms/InstCombine/load.ll index 47da1ff0068..f80e02e464e 100644 --- a/test/Transforms/InstCombine/load.ll +++ b/test/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/test/Transforms/InstCombine/not.ll b/test/Transforms/InstCombine/not.ll index 24d8f69a4b2..0928ce7bc30 100644 --- a/test/Transforms/InstCombine/not.ll +++ b/test/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/test/Transforms/InstCombine/or.ll b/test/Transforms/InstCombine/or.ll index e01bb11bf58..09141a3c0ac 100644 --- a/test/Transforms/InstCombine/or.ll +++ b/test/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/test/Transforms/InstCombine/phi.ll b/test/Transforms/InstCombine/phi.ll index 52d9157a44a..f867bdf4265 100644 --- a/test/Transforms/InstCombine/phi.ll +++ b/test/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/test/Transforms/InstCombine/pow.ll b/test/Transforms/InstCombine/pow.ll index 9a3ca7e6f9f..66027cde124 100644 --- a/test/Transforms/InstCombine/pow.ll +++ b/test/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/test/Transforms/InstCombine/rem.ll b/test/Transforms/InstCombine/rem.ll index ddc1c4b0c66..09300a56726 100644 --- a/test/Transforms/InstCombine/rem.ll +++ b/test/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/test/Transforms/InstCombine/set.ll b/test/Transforms/InstCombine/set.ll index f97a2b6198d..760e14d1e29 100644 --- a/test/Transforms/InstCombine/set.ll +++ b/test/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/test/Transforms/InstCombine/setcc-strength-reduce.ll b/test/Transforms/InstCombine/setcc-strength-reduce.ll index 375dac60714..9051d032cff 100644 --- a/test/Transforms/InstCombine/setcc-strength-reduce.ll +++ b/test/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/test/Transforms/InstCombine/shift.ll b/test/Transforms/InstCombine/shift.ll index 66a08178900..67e2827007f 100644 --- a/test/Transforms/InstCombine/shift.ll +++ b/test/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/test/Transforms/InstCombine/sub.ll b/test/Transforms/InstCombine/sub.ll index 184886c9be2..4bd9be645b5 100644 --- a/test/Transforms/InstCombine/sub.ll +++ b/test/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