https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123940
Robin Dapp <rdapp at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rdapp at gcc dot gnu.org
--- Comment #3 from Robin Dapp <rdapp at gcc dot gnu.org> ---
This also fails with -march=rv64gcv (i.e. 128-bit vectors).
The optimized dump has:
_48 = (long int) f.2_5;
vect_pretmp_50.23_121 = MEM <vector(2) char> [(char *)&d + 14B];
vect_patt_99.26_124 = .FMA (vect_pretmp_50.23_121, { 2, 2 },
vect_pretmp_50.23_121);
_126 = BIT_FIELD_REF <vect_patt_99.26_124, 8, 8>;
<bb 6> [local count: 63136016]:
# e_lsm.9_33 = PHI <_126(5), _42(4)>
# prephitmp_8 = PHI <_48(5), -1(4)>
a = prephitmp_8;
e = e_lsm.9_33;
_7 = (long long int) e_lsm.9_33;
b = _7;
printf ("%llu\n", _7);
So we load from d in
e = (c[j] ? j : d[j]) + d[j];
but c is always true so we should always use j (= 15 in the last iteration).
In cunroll the code still looks correct to me and it, at first sight, it starts
to look wrong in fre. Going to have a more thorough look but my first hunch is
a Bool-data mismatch somewhere.