diff options
author | Richard Biener <rguenther@suse.de> | 2014-10-16 10:13:52 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2014-10-16 10:13:52 +0000 |
commit | 93a95abe925edc98131056a6b716e7a9e15f72cc (patch) | |
tree | 20fc664da392c7860ee5505c631575ae25f7fc13 /gcc/testsuite | |
parent | 0c49f2ed839ba727b236e97e5be03239fd81256c (diff) | |
download | gcc-93a95abe925edc98131056a6b716e7a9e15f72cc.zip gcc-93a95abe925edc98131056a6b716e7a9e15f72cc.tar.gz gcc-93a95abe925edc98131056a6b716e7a9e15f72cc.tar.bz2 |
re PR tree-optimization/63168 (loop header copying fails - not vectorized: latch block not empty)
2014-10-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/63168
* tree-cfg.c (gimple_can_merge_blocks_p): Only protect
latches if after merging they are no longer simple.
* cfghooks.c (merge_blocks): Handle merging a latch block
into another block.
* gcc.dg/tree-ssa/loop-40.c: New testcase.
From-SVN: r216304
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/loop-40.c | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b283b94..e281e8c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-10-16 Richard Biener <rguenther@suse.de> + + PR tree-optimization/63168 + * gcc.dg/tree-ssa/loop-40.c: New testcase. + 2014-10-16 Andreas Schwab <schwab@suse.de> * gcc.target/m68k/crash1.c: Fix implicit declaration. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-40.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-40.c new file mode 100644 index 0000000..803e5b6 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-40.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-ch-details" } */ + +int mymax2(int *it, int *end) +{ + int max = *it; + while (++it != end) + if (*it > max) + max = *it; + return max; +} + +/* { dg-final { scan-tree-dump "Duplicating header" "ch" } } */ +/* { dg-final { cleanup-tree-dump "ch" } } */ |