[Bug tree-optimization/50328] New: loop interchange confuses vectorizer
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Sep 8 13:30:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50328
Bug #: 50328
Summary: loop interchange confuses vectorizer
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rguenth@gcc.gnu.org
CC: irar@gcc.gnu.org
For
double dvec[256];
void test (void)
{
long i, j;
for (j = 0; j < 131072; ++j)
for (i = 0; i < 256; ++i)
dvec[i] *= 1.0000001;
}
the loops are interchanged with -Ofast -floop-interchange but the vectorizer
is confused by the extra IV lim inserts:
<bb 4>:
# graphite_IV.6_21 = PHI <0(3), graphite_IV.6_22(5)>
# dvec_I_lsm.7_26 = PHI <dvec_I_lsm.7_10(3), D.2732_25(5)>
# ivtmp.9_19 = PHI <131072(3), ivtmp.9_29(5)>
D.2732_25 = dvec_I_lsm.7_26 *
1.0000001000000000583867176828789524734020233154296875e+0;
graphite_IV.6_22 = graphite_IV.6_21 + 1;
ivtmp.9_29 = ivtmp.9_19 - 1;
if (ivtmp.9_29 != 0)
goto <bb 5>;
else
goto <bb 6>;
<bb 5>:
goto <bb 4>;
this isn't detected as reduction for some reason.
More information about the Gcc-bugs
mailing list