https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110711
--- Comment #4 from Hongtao.liu <crazylht at gmail dot com> ---
<bb 18> [local count: 105119324]:
_6 = .LOOP_VECTORIZED (1, 2);
if (_6 != 0)
goto <bb 19>; [100.00%]
else
goto <bb 20>; [100.00%]
<bb 19> [local count: 105119324]:
<bb 5> [local count: 955630227]:
# i_21 = PHI <i_16(10), 1(19)>
# prephitmp_19 = PHI <prephitmp_24(10), _1(19)>
_2 = i_21 * 8;
_3 = a_10(D) + _2;
_17 = MEM[(const double &)_3];
_29 = MAX_EXPR <_17, prephitmp_19>;
prephitmp_24 = _29;
i_16 = i_21 + 1;
if (n_els_7(D) > i_16)
goto <bb 10>; [89.00%]
else
goto <bb 13>; [11.00%]
<bb 13> [local count: 105119324]:
# prephitmp_15 = PHI <_29(5), prephitmp_27(16)>
goto <bb 8>; [100.00%]
<bb 10> [local count: 850510903]:
goto <bb 5>; [100.00%]
test.C:8:26: note: Analyze phi: prephitmp_19 = PHI <prephitmp_24(10), _1(19)>
test.C:8:26: note: reduction path: prephitmp_24 _29 prephitmp_19
test.C:8:26: note: reduction: unknown pattern
test.C:8:26: missed: Unknown def-use cycle pattern.
test.C:8:26: note: === vect_determine_precisions ===
It looks like there's extra move generate by ifcvt which make vectorizer think
it's not a reduction. prephitmp_24 can be replaced with _29 since it's not used
elsewhere.