diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-21 19:37:05 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-21 19:37:05 +0000 |
commit | b2009e332c150356085f0fb0e35a3a452b10c378 (patch) | |
tree | c188ce224e4d028d0ab5f3313b2bc6e749eb88e9 /gcc/testsuite/gcc.dg/tree-ssa | |
parent | 323d3e1d50a7a2022e587b786d010c22812a6d5a (diff) | |
download | gcc-b2009e332c150356085f0fb0e35a3a452b10c378.tar.gz |
2011-07-21 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 176576 using svnmerge.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@176583 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/bitwise-sink.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/bool-10.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/bool-11.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/ipa-cp-1.c | 8 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/pr18908.c | 9 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/pr30978.c | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-6.c | 2 |
7 files changed, 23 insertions, 7 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/bitwise-sink.c b/gcc/testsuite/gcc.dg/tree-ssa/bitwise-sink.c index f44529995b7..1de04bc8431 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/bitwise-sink.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/bitwise-sink.c @@ -7,5 +7,5 @@ foo (_Bool x) return (x ^ 1); } -/* { dg-final { scan-tree-dump-times "x\[^ \]* \\^ 1" 1 "optimized" } } */ +/* { dg-final { scan-tree-dump-times "~x" 1 "optimized" } } */ /* { dg-final { cleanup-tree-dump "optimized" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/bool-10.c b/gcc/testsuite/gcc.dg/tree-ssa/bool-10.c index d7bf20da81b..58d064539a7 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/bool-10.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/bool-10.c @@ -9,6 +9,6 @@ int f(_Bool x) /* There should be no != 1 which is produced by the front-end as bool_var != 1 is the same as !bool_var. */ /* { dg-final { scan-tree-dump-times "!= 1" 0 "optimized"} } */ -/* { dg-final { scan-tree-dump-times "!x" 1 "optimized"} } */ +/* { dg-final { scan-tree-dump-times "~x" 1 "optimized"} } */ /* { dg-final { cleanup-tree-dump "optimized" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/bool-11.c b/gcc/testsuite/gcc.dg/tree-ssa/bool-11.c index 8d88b7e87d5..ee266c79cb9 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/bool-11.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/bool-11.c @@ -9,6 +9,6 @@ int f(_Bool x) /* There should be no == 0 which is produced by the front-end as bool_var == 0 is the same as !bool_var. */ /* { dg-final { scan-tree-dump-times "== 0" 0 "optimized"} } */ -/* { dg-final { scan-tree-dump-times "!x" 1 "optimized"} } */ +/* { dg-final { scan-tree-dump-times "~x" 1 "optimized"} } */ /* { dg-final { cleanup-tree-dump "optimized" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ipa-cp-1.c b/gcc/testsuite/gcc.dg/tree-ssa/ipa-cp-1.c index 7918eb7562d..26b433823ac 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ipa-cp-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ipa-cp-1.c @@ -5,9 +5,13 @@ int very_long_function(int a) { - return very_long_function (a)/4; + if (a > 0) + return 2 * a + very_long_function (a)/4; + else + return 2 * -a + very_long_function (a)/4; } -main() + +blah () { very_long_function (1); } diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr18908.c b/gcc/testsuite/gcc.dg/tree-ssa/pr18908.c new file mode 100644 index 00000000000..cfc92fec9c4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr18908.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fdump-tree-forwprop1" } */ + +_Bool f3(_Bool *p) { *p ^= 1; } + +/* We should be able to canonicalize the above to use bitwise not. */ +/* { dg-final { scan-tree-dump "~D" "forwprop1" } } */ +/* { dg-final { scan-tree-dump-not "\\\^ 1" "forwprop1" } } */ +/* { dg-final { cleanup-tree-dump "forwprop1" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr30978.c b/gcc/testsuite/gcc.dg/tree-ssa/pr30978.c index 3329383cbe8..ee45e5b4fe8 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr30978.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr30978.c @@ -10,5 +10,8 @@ int foo(int a) return e; } -/* { dg-final { scan-tree-dump "e_. = a_..D. > 0;" "optimized" } } */ +/* { dg-final { scan-tree-dump-times " = " 2 "optimized" } } */ +/* One comparison and one extension to int. */ +/* { dg-final { scan-tree-dump " = a_..D. > 0;" "optimized" } } */ +/* { dg-final { scan-tree-dump "e_. = \\\(int\\\)" "optimized" } } */ /* { dg-final { cleanup-tree-dump "optimized" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-6.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-6.c index 65883cd14bd..18a9d9b895a 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-6.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-6.c @@ -2,5 +2,5 @@ /* { dg-options "-O -fdump-tree-fre1-details" } */ int i; int foo(void) { i = 2; int j = i * 2; int k = i + 2; return j == k; } -/* { dg-final { scan-tree-dump-times "Replaced " 5 "fre1" } } */ +/* { dg-final { scan-tree-dump-times "Replaced " 6 "fre1" } } */ /* { dg-final { cleanup-tree-dump "fre1" } } */ |