------- Additional Comments From rguenth at tat dot physik dot uni-tuebingen dot de 2005-01-29 21:14 ------- Or we could simply unroll the loop completely, but while SCEV finds the IV as
(set_scalar_evolution (scalar = this_6) (scalar_evolution = {(struct Foo * const) &x.foo[2] - 4B, +, -4B}_1)) ) it does not know about the number of iterations: (set_nb_iterations_in_loop = scev_not_known)) # BLOCK 1 # PRED: 3 [100.0%] (fallthru) 0 [100.0%] (fallthru,exec) Invalid sum of incoming frequencies 10258, should be 10000 # thisD.1628_1 = PHI <thisD.1628_6(3), &xD.1600.fooD.1587[2](0)>; <L2>:; thisD.1628_6 = thisD.1628_1 - 4; if (thisD.1628_6 == &xD.1600.fooD.1587) goto <L6>; else goto <L10>; # SUCC: 2 [11.0%] (loop_exit,true,exec) 3 [89.0%] (dfs_back,false,exec) # BLOCK 3 # PRED: 1 [89.0%] (dfs_back,false,exec) <L10>:; goto <bb 1> (<L2>); # SUCC: 1 [100.0%] (fallthru) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19639