]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/114471 - ICE with mismatching vector types
authorRichard Biener <rguenther@suse.de>
Tue, 26 Mar 2024 08:11:00 +0000 (09:11 +0100)
committerRichard Biener <rguenther@suse.de>
Tue, 26 Mar 2024 10:05:41 +0000 (11:05 +0100)
commitf4e92d62dccb96ade753f3a8f49be1b5f61c31f1
tree157fb3b30427a72959eadf73ea44eba3481dfaa1
parent226a220d0056396e825e12435cc0da52cbd5ac56
tree-optimization/114471 - ICE with mismatching vector types

The following fixes too lax verification of vector type compatibility
in vectorizable_operation.  When we only have a single vector size then
comparing the number of elements is enough but with SLP we mix those
and thus for operations like BIT_AND_EXPR we need to verify compatible
element types as well.  Allow sign changes for ABSU_EXPR though.

PR tree-optimization/114471
* tree-vect-stmts.cc (vectorizable_operation): Verify operand
types are compatible with the result type.

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