]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/122885 - avoid re-using accumulator for some bool vectors
authorRichard Biener <rguenther@suse.de>
Thu, 27 Nov 2025 09:04:19 +0000 (10:04 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 27 Nov 2025 10:26:11 +0000 (11:26 +0100)
commitb5ffe35f12e15e29b508eb937251d067febe18fe
tree0e936a97b09d536146a4c938e1956e3962fb57d6
parentd07b9e7fe42026cf9ca9a53dc354dfe9e5528612
tree-optimization/122885 - avoid re-using accumulator for some bool vectors

When boolean vectors do not use vector integer modes we are not
set up to produce the partial epilog in a correctly typed way,
so avoid this situation.  For the integer mode case we are able
to pun things correctly, so keep that working.

PR tree-optimization/122885
* tree-vect-loop.cc (vect_find_reusable_accumulator): Reject
mask vectors which do not use integer vector modes.
(vect_create_partial_epilog): Assert the same.

* gcc.dg/torture/pr122873.c: New testcase.
gcc/testsuite/gcc.dg/torture/pr122873.c [new file with mode: 0644]
gcc/tree-vect-loop.cc