]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/115395 - wrong-code with SLP reduction in epilog
authorRichard Biener <rguenther@suse.de>
Mon, 10 Jun 2024 08:12:52 +0000 (10:12 +0200)
committerRichard Biener <rguenther@suse.de>
Mon, 10 Jun 2024 09:38:41 +0000 (11:38 +0200)
commit4ed9c5df7efeb98e190573cca42a4fd40666c45f
tree9ac7e9d9cb353f3fef53aefe38828c68c249adb4
parent627244477949da068456dc195a88be5437e11d02
tree-optimization/115395 - wrong-code with SLP reduction in epilog

When we continue a non-SLP reduction from the main loop in the
epilog with a SLP reduction we currently fail to handle an
adjustment by the initial value because that's not a thing with SLP.
As long as we have the possibility to mix SLP and non-SLP we have
to handle it though.

PR tree-optimization/115395
* tree-vect-loop.cc (vect_create_epilog_for_reduction):
Handle STMT_VINFO_REDUC_EPILOGUE_ADJUSTMENT also for SLP
reductions of group_size one.

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