https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97307
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
The patch will cause
FAIL: gcc.dg/vect/pr65947-3.c scan-tree-dump-times vect "LOOP VECTORIZED" 2
since the testcase has exactly such a pattern:
unsigned int
condition_reduction (unsigned int *a, unsigned int min_v, unsigned int *b)
{
unsigned int last = N + 65;
unsigned int aval;
for (unsigned int i = 0; i < N; i++)
{
aval = a[i];
if (b[i] < min_v)
last = aval;
}
return last;
}
and sinking the aval = a[i] load causes if-conversion to no longer happen
because a[i] now appears to only conditionally trap. It will be vectorized
with masked loads if those are available though, so I'm considering to
XFAIL it for the moment.