[Bug middle-end/56770] Partial sums loop optimization

dje at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Mar 29 19:53:00 GMT 2013


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

--- Comment #5 from David Edelsohn <dje at gcc dot gnu.org> 2013-03-29 19:53:44 UTC ---
Segher pointed out that the transformed code example is has a bug.  The first
revised loop should test j+1 < NZ.

    for (j = 0; j+1 < NZ; j += 2){
        fValue += Q[j] / r[j];
        fValue1 += Q[j+1] / r[j+1];
    }



More information about the Gcc-bugs mailing list