This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/43866] [4.3/4.4/4.5/4.6 Regression] wrong code with -fbounds-check -funswitch-loops



------- Comment #16 from rakdver at gcc dot gnu dot org  2010-06-25 09:04 -------
> Now, in the first loop if we decide to unswitch on cond3, it transforms this
> into:
...
> If cond3 tests some variable that is initialized only if cond1 is false, this
> unswitching (besides not being very useful because cond3 is never tested when
> cond1 is false in the original program) results in jumps on uninitialized
> values comparison.

while unswitching on cond3 indeed does not make sense, I don't think it can
result in a jump on uninitialized value comparison.  Unswitching only works if
the arguments of the comparison are ssa names whose values are computed outside
of the loop (it does not do invariant motion by itself).  So, the computations
based on uninitialized values would have to be introduced by some other pass
(possibly invariant motion).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43866


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]