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/gcc.dg | |
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/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/loop-40.c | 14 |
1 files changed, 14 insertions, 0 deletions
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" } } */ |