[Bug tree-optimization/93767] [8 Regression] wrong code at -O3 on x86_64-linux-gnu since r8-6064
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 25 09:51:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93767
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Richard Sandiford
<rsandifo@gcc.gnu.org>:
https://gcc.gnu.org/g:a6378029183005ff05865496975ff706d91853d8
commit r8-10060-ga6378029183005ff05865496975ff706d91853d8
Author: Richard Sandiford <richard.sandiford@arm.com>
Date: Tue Feb 18 18:06:32 2020 +0000
vect: Fix offset calculation for -ve strides [PR93767]
This PR is a regression caused by r256644, which added support for alias
checks involving variable strides. One of the changes in that commit
was to split the access size out of the segment length. The PR shows
that I hadn't done that correctly for the handling of negative strides
in vect_compile_time_alias. The old code was:
const_length_a = (-wi::to_poly_wide (segment_length_a)).force_uhwi
();
offset_a = (offset_a + vect_get_scalar_dr_size (a)) - const_length_a;
where vect_get_scalar_dr_size (a) was cancelling out the subtraction
of the access size inherent in "- const_length_a". Taking the access
size out of the segment length meant that the addition was no longer
needed/correct.
2020-02-25 Richard Sandiford <richard.sandiford@arm.com>
gcc/
Backport from mainline
2020-02-19 Richard Sandiford <richard.sandiford@arm.com>
PR tree-optimization/93767
* tree-vect-data-refs.c (vect_compile_time_alias): Remove the
access-size bias from the offset calculations for negative strides.
gcc/testsuite/
Backport from mainline
2020-02-19 Richard Sandiford <richard.sandiford@arm.com>
PR tree-optimization/93767
* gcc.dg/vect/pr93767.c: New test.
More information about the Gcc-bugs
mailing list