This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/61171] vectorization fails for a reduction in presence of subtraction
- From: "alalaw01 at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 17 Jun 2015 11:48:12 +0000
- Subject: [Bug tree-optimization/61171] vectorization fails for a reduction in presence of subtraction
- Auto-submitted: auto-generated
- References: <bug-61171-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61171
alalaw01 at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |alalaw01 at gcc dot gnu.org
--- Comment #2 from alalaw01 at gcc dot gnu.org ---
This vectorizes fine, if vv is made a local variable:
float isOk() {
float vv = 0;
for (int j=0U; j<N; ++j) {
float ax = xx-px[j];
vv+=ax;
}
return vv;
}