This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/43866] [4.3/4.4/4.5/4.6 Regression] wrong code with -fbounds-check -funswitch-loops
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jun 2010 12:11:05 -0000
- Subject: [Bug middle-end/43866] [4.3/4.4/4.5/4.6 Regression] wrong code with -fbounds-check -funswitch-loops
- References: <bug-43866-6642@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #22 from jakub at gcc dot gnu dot org 2010-06-25 12:11 -------
Subject: Bug 43866
Author: jakub
Date: Fri Jun 25 12:10:42 2010
New Revision: 161375
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=161375
Log:
PR middle-end/43866
* tree-ssa-loop-unswitch.c (tree_may_unswitch_on): If stmt is always
true or always false, return NULL_TREE.
(tree_unswitch_single_loop): Optimize conditions even when reaching
max-unswitch-level parameter. If num > 0, optimize first all
conditions
using entry checks, then do still reachable block discovery and
consider
only conditions in still reachable basic blocks in the loop.
* gfortran.dg/pr43866.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/pr43866.f90
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-loop-unswitch.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43866