diff options
Diffstat (limited to 'llvm/test/Regression/Transforms/Reassociate')
9 files changed, 13 insertions, 40 deletions
diff --git a/llvm/test/Regression/Transforms/Reassociate/2002-05-15-AgressiveSubMove.ll b/llvm/test/Regression/Transforms/Reassociate/2002-05-15-AgressiveSubMove.ll index 8646ae3cabc..94785f318fa 100644 --- a/llvm/test/Regression/Transforms/Reassociate/2002-05-15-AgressiveSubMove.ll +++ b/llvm/test/Regression/Transforms/Reassociate/2002-05-15-AgressiveSubMove.ll @@ -1,9 +1,6 @@ -; RUN: if as < %s | opt -reassociate -instcombine -constprop -dce | dis | grep add -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -reassociate -instcombine -constprop -dce | dis | not grep add -int "test"(int %A) { +int %test(int %A) { %X = add int %A, 1 %Y = add int %A, 1 %r = sub int %X, %Y diff --git a/llvm/test/Regression/Transforms/Reassociate/2002-05-15-MissedTree.ll b/llvm/test/Regression/Transforms/Reassociate/2002-05-15-MissedTree.ll index 1d08a1054e2..4f36c96b364 100644 --- a/llvm/test/Regression/Transforms/Reassociate/2002-05-15-MissedTree.ll +++ b/llvm/test/Regression/Transforms/Reassociate/2002-05-15-MissedTree.ll @@ -1,9 +1,6 @@ -; RUN: if as < %s | opt -reassociate -instcombine -constprop -die | dis | grep 5 -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -reassociate -instcombine -constprop -die | dis | not grep 5 -int "test"(int %A, int %B) { +int %test(int %A, int %B) { %W = add int %B, -5 %Y = add int %A, 5 %Z = add int %W, %Y diff --git a/llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate.ll b/llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate.ll index 7df7bafb256..2136e094253 100644 --- a/llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate.ll +++ b/llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate.ll @@ -1,11 +1,8 @@ ; With sub reassociation, constant folding can eliminate all of the constants. ; -; RUN: if as < %s | opt -reassociate -constprop -instcombine -dce | dis | grep add -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -reassociate -constprop -instcombine -dce | dis | not grep add -int "test"(int %A, int %B) { +int %test(int %A, int %B) { %W = add int 5, %B %X = add int -7, %A %Y = sub int %X, %W diff --git a/llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate2.ll b/llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate2.ll index aa0066a1ff3..05f9bd4ae6a 100644 --- a/llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate2.ll +++ b/llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate2.ll @@ -1,9 +1,6 @@ ; With sub reassociation, constant folding can eliminate the two 12 constants. ; -; RUN: if as < %s | opt -reassociate -constprop -dce | dis | grep 12 -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -reassociate -constprop -dce | dis | not grep 12 int "test"(int %A, int %B, int %C, int %D) { %M = add int %A, 12 diff --git a/llvm/test/Regression/Transforms/Reassociate/basictest.ll b/llvm/test/Regression/Transforms/Reassociate/basictest.ll index ac5932053fd..cad7a5aafda 100644 --- a/llvm/test/Regression/Transforms/Reassociate/basictest.ll +++ b/llvm/test/Regression/Transforms/Reassociate/basictest.ll @@ -1,11 +1,8 @@ ; With reassociation, constant folding can eliminate the 12 and -12 constants. ; -; RUN: if as < %s | opt -reassociate -constprop -instcombine -die | dis | grep add -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -reassociate -constprop -instcombine -die | dis | not grep add -int "test"(int %arg) { +int %test(int %arg) { %tmp1 = sub int -12, %arg %tmp2 = add int %tmp1, 12 ret int %tmp2 diff --git a/llvm/test/Regression/Transforms/Reassociate/basictest2.ll b/llvm/test/Regression/Transforms/Reassociate/basictest2.ll index 192b8d3d086..31c3be0a878 100644 --- a/llvm/test/Regression/Transforms/Reassociate/basictest2.ll +++ b/llvm/test/Regression/Transforms/Reassociate/basictest2.ll @@ -1,9 +1,6 @@ ; With reassociation, constant folding can eliminate the +/- 30 constants. ; -; RUN: if as < %s | opt -reassociate -constprop -instcombine -die | dis | grep 30 -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -reassociate -constprop -instcombine -die | dis | not grep 30 int "test"(int %reg109, int %reg1111) { %reg115 = add int %reg109, -30 ; <int> [#uses=1] diff --git a/llvm/test/Regression/Transforms/Reassociate/looptest.ll b/llvm/test/Regression/Transforms/Reassociate/looptest.ll index a05e64a04d9..06dea0bbbb7 100644 --- a/llvm/test/Regression/Transforms/Reassociate/looptest.ll +++ b/llvm/test/Regression/Transforms/Reassociate/looptest.ll @@ -12,10 +12,7 @@ ; In this case, we want to reassociate the specified expr so that i+j can be ; hoisted out of the inner most loop. ; -; RUN: if as < %s | opt -reassociate | dis | grep 115 | grep 117 -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -reassociate | dis | grep 115 | not grep 117 %.LC0 = internal global [4 x sbyte] c"%d\0A\00" ; <[4 x sbyte]*> [#uses=1] diff --git a/llvm/test/Regression/Transforms/Reassociate/otherops.ll b/llvm/test/Regression/Transforms/Reassociate/otherops.ll index 7182e1f72ac..6960b1df991 100644 --- a/llvm/test/Regression/Transforms/Reassociate/otherops.ll +++ b/llvm/test/Regression/Transforms/Reassociate/otherops.ll @@ -1,9 +1,6 @@ ; Reassociation should apply to Add, Mul, And, Or, & Xor ; -; RUN: if as < %s | opt -reassociate -constprop -instcombine -die | dis | grep 12 -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -reassociate -constprop -instcombine -die | dis | not grep 12 int "test_mul"(int %arg) { %tmp1 = mul int 12, %arg diff --git a/llvm/test/Regression/Transforms/Reassociate/subtest.ll b/llvm/test/Regression/Transforms/Reassociate/subtest.ll index e3a7adf5aed..38a887b5662 100644 --- a/llvm/test/Regression/Transforms/Reassociate/subtest.ll +++ b/llvm/test/Regression/Transforms/Reassociate/subtest.ll @@ -1,9 +1,6 @@ ; With sub reassociation, constant folding can eliminate the 12 and -12 constants. ; -; RUN: if as < %s | opt -reassociate -constprop -instcombine -die | dis | grep 12 -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -reassociate -constprop -instcombine -die | dis | not grep 12 int "test"(int %A, int %B) { %X = add int -12, %A |