------- Comment #1 from pinskia at gcc dot gnu dot org 2006-12-13 16:33 ------- Actually there are two issues with this bug, one issue is that we change (float)(CMP) into CMP?1.0:0.0 early on which in the end causes us to produce three different versions of the inner loop. If we write the inner loop as: for( int i = 0; i < 3; i++ ) for( int j = 0; j < 3; j++ ) { bool a = (i == j); (*this)(i, j) = a * factor; }
And use -O3 -funroll-loops, we get the correct unrolled looped (though the multiply is still there because of signed zeros). And the second issue is unrolling the outer loop does not happen on the tree level. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2006-12-13 16:33:34 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30201