This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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];
    }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]