https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122301
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixing the pattern updating of reduc_idx shows
t.c:6:21: note: ==> examining statement: seg_id_21 = PHI <seg_id_14(10),
8(8)>
t.c:6:21: missed: conversion in the reduction chain.
t.c:3:6: missed: not vectorized: relevant stmt not supported: seg_id_21 = PHI
<seg_id_14(10), 8(8)>
so we then refuse to vectorize the MIN/MAX reduction that was narrowed from
int to char. The pattern checks
/* Punt for reductions where we don't handle the type conversions. */
if (STMT_VINFO_DEF_TYPE (last_stmt_info) == vect_reduction_def)
return NULL;
but this isn't effective.
Testing a patch.