]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/119640 - ICE with vectorized shift placement
authorRichard Biener <rguenther@suse.de>
Mon, 7 Apr 2025 09:27:19 +0000 (11:27 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 7 Apr 2025 11:12:34 +0000 (13:12 +0200)
commita4abf0fb902816a2508dda5956f407fc27821d88
tree776e6e57cdeea83ab5a38c805eeb04f3771ca574
parent29cc92348e0d32b7d301eae42aaebd716736f037
tree-optimization/119640 - ICE with vectorized shift placement

When the whole shift is invariant but the shift amount needs
to be converted and a vector shift used we can mess up placement
of vector stmts because we do not make SLP scheduling aware of
the need to insert code for it.  The following mitigates this
by more conservative placement of such code in vectorizable_shift.

PR tree-optimization/119640
* tree-vect-stmts.cc (vectorizable_shift): Always insert code
for one of our SLP operands before the code for the vector
shift itself.

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