[Bug tree-optimization/30104] missed code motion optimization (invariant control structures)

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Dec 7 16:49:00 GMT 2006



------- Comment #3 from rguenth at gcc dot gnu dot org  2006-12-07 16:49 -------
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.


-- 


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



More information about the Gcc-bugs mailing list