]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/118405 - ICE with vector(1) T vs T load
authorRichard Biener <rguenther@suse.de>
Mon, 13 Jan 2025 09:15:10 +0000 (10:15 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 14 Jan 2025 07:29:43 +0000 (08:29 +0100)
commit31c3c1a83fd885b4687c9f6f7acd68af76d758d3
treec087e2bbcaa1a6c1f0f656243d521b961cd67e5d
parent20b8500cfa522ebe0fcf756d5b32816da7f904dd
tree-optimization/118405 - ICE with vector(1) T vs T load

When vectorizing a load we are now checking alignment before emitting
a vector(1) T load instead of blindly assuming it's OK when we had
a scalar T load.  For reasons we're not handling alignment computation
optimally here but we shouldn't ICE when we fall back to loads of T.

The following ensures the IL remains correct by emitting VIEW_CONVERT
from T to vector(1) T when needed.  It also removes an earlier fix
done in r9-382-gbb4e47476537f6 for the same issue with VMAT_ELEMENTWISE.

PR tree-optimization/118405
* tree-vect-stmts.cc (vectorizable_load): When we fall back
to scalar loads make sure we properly convert to vector(1) T
when there was only a single vector element.
gcc/tree-vect-stmts.cc