tree-optimization/111891 - fix assert in vectorizable_simd_clone_call
commitd70575f542f575133eb4c49eda89ab61eedf83b8
authorRichard Biener <rguenther@suse.de>
Fri, 20 Oct 2023 10:22:52 +0000 (20 12:22 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 20 Oct 2023 12:14:13 +0000 (20 14:14 +0200)
tree7d99caa893c3fa3df139ccd7fde7ac809954d85f
parentc7ec7bd1c6590cf4eed267feab490288e0b8d691
tree-optimization/111891 - fix assert in vectorizable_simd_clone_call

The following fixes the assert in vectorizable_simd_clone_call to
assert we have a vector type during transform.  Whether we have
one during analysis depends on whether another SLP user decided
on the type of a constant/external already.  When we end up with
a mismatch in desire the updating will fail and make vectorization
fail.

PR tree-optimization/111891
* tree-vect-stmts.cc (vectorizable_simd_clone_call): Fix
assert.

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