]> git.ipfire.org Git - thirdparty/gcc.git/commit
vect: Fix infinite loop while determining peeling amount
authorStefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Wed, 22 Jul 2020 07:27:49 +0000 (09:27 +0200)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 16:20:01 +0000 (13:20 -0300)
commit54f2e5942de72c5308c97b01ee241ea07c3fa1d0
tree2caf3c32b87c3cb24506fd515b2955790a06fa97
parentee3b1655acbb03eba22e0adfa4ae493a2b495b7d
vect: Fix infinite loop while determining peeling amount

This is a follow up to commit 5c9669a0e6c respectively discussion
https://gcc.gnu.org/pipermail/gcc-patches/2020-June/549132.html

In case a type has a lower alignment than its size, ensure that we
advance.  For example, on s390x we have for a long double an alignment
constraint of 8 bytes whereas the size is 16 bytes.  Increasing the loop
variable only by TARGET_ALIGN / DR_SIZE which equals zero in case of a
long double results in an infinite loop.  This is fixed by ensuring that
we advance at least by one.

gcc/ChangeLog:

* tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
Ensure that loop variable npeel_tmp advances in each iteration.
gcc/tree-vect-data-refs.c