]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/101636 - CTOR vectorization ICE
authorRichard Biener <rguenther@suse.de>
Wed, 23 Feb 2022 10:15:38 +0000 (11:15 +0100)
committerRichard Biener <rguenther@suse.de>
Wed, 23 Mar 2022 14:07:22 +0000 (15:07 +0100)
commit893cb28a22f86281ca9ce1e045da7b8840ceb121
tree5d579c139550e509aa32359679eabac1656242f8
parentd1f4dfd409dedf4d00ca7be001cf757d0d6e82f4
tree-optimization/101636 - CTOR vectorization ICE

The following fixes an ICE when vectorizing the defs of a CTOR
results in a different vector type than expected.  That can happen
with AARCH64 SVE and a fixed vector length as noted in r10-5979
and on x86 with AVX512 mask CTORs and trying to re-vectorize
using SSE as shown in this bug.

The fix is simply to reject the vectorization when it didn't
produce the desired type.

2022-02-23  Richard Biener  <rguenther@suse.de>

PR tree-optimization/101636
PR tree-optimization/104782
* tree-vect-slp.c (vect_slp_analyze_operations): Make sure
the CTOR is vectorized with an expected type.

* c-c++-common/torture/pr101636.c: Likewise.
* gcc.dg/vect/pr104782.c: New testcase.
gcc/testsuite/c-c++-common/torture/pr101636.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/pr104782.c [new file with mode: 0644]
gcc/tree-vect-slp.c