re PR tree-optimization/78185 (Wrong branch optimization with -O1 on x86/x86_64)
authorRichard Biener <rguenther@suse.de>
Fri, 4 Nov 2016 08:54:42 +0000 (08:54 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 4 Nov 2016 08:54:42 +0000 (08:54 +0000)
commit964ef24cd591632a38c3e48154de389470df13df
tree1b2211b7c396c888eb15aa2da13e53fad2848ab5
parentb07aafb1ace3bf542acf3884bddf014d0d466ef3
re PR tree-optimization/78185 (Wrong branch optimization with -O1 on x86/x86_64)

2016-11-04  Richard Biener  <rguenther@suse.de>

PR middle-end/78185
* loop-invariant.c (find_exits): Record entering inner
loops as possibly exiting to handle infinite sub-loops.
* tree-ssa-loop-im.c: Include tree-ssa-loop-niter.h.
(fill_always_executed_in_1): Honor infinite child loops.

* gcc.dg/pr78185.c: New testcase.

From-SVN: r241841
gcc/ChangeLog
gcc/loop-invariant.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr78185.c [new file with mode: 0644]
gcc/tree-ssa-loop-im.c