------- Comment #4 from dann at godzilla dot ics dot uci dot edu  2006-12-07 
18:24 -------
(In reply to comment #3)
> unswitching would duplicate the whole loop here, so not exactly I think.  But
> if-conversion to
> 
>   j = COND_EXPR <p, 1, 2>
> 
> or
> 
>   j = 2 - (int)p;
> 
> would make j loop invariant.

if-conversion would solve this particular testcase, but the more general case
of moving invariant control structures out of the loop is probably more
interesting. 


-- 


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

Reply via email to