------- 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