This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/56770] Partial sums loop optimization
- From: "dje at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 29 Mar 2013 19:53:44 +0000
- Subject: [Bug middle-end/56770] Partial sums loop optimization
- Auto-submitted: auto-generated
- References: <bug-56770-4 at http dot gcc dot gnu dot org/bugzilla/>
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];
}