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

--- Comment #12 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-13 
13:26:59 UTC ---
(In reply to comment #11)
> I do not have a clear case in hand with evidence of "double" compare
> I will have a closer look to "real life" code.
> 
> btw 
> I just noticed that your test case does not vectorize even if
> I rewrite as
>  for (; a ; ++j) 
>        xsum[j] = (cluster[j] > 0.) ? 0. : cluster[j];
> 
> any idea why?

It's because of the loop exit condition which we realize makes the loop
execute at most once.  If you rewrite it to for (; j < a; ++j) then it works.

Reply via email to