PR97693: Specify required vectype in vectorizable_call
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 17 Nov 2020 11:51:40 +0000 (11:51 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Tue, 17 Nov 2020 11:51:40 +0000 (11:51 +0000)
commitfcd513df9aa83f30dbd1c34d13c8a0972702ffa1
tree9aaaa1efe74624d302c4b128d8fa3fc30a03f80c
parentf6da5ecb058cbdcbf8f8efc2d7dcdf9b7bc3a4fa
PR97693: Specify required vectype in vectorizable_call

The vectorizable_call part of r11-1143 dropped the required
vectype when moving from vect_get_vec_def_for_operand to
vect_get_vec_defs_for_operand.  This caused an ICE on the
testcase for SVE, because we ended up with a non-predicate
value being passed to a predicate input.

AFAICT this was the only instance of that happening.  The types
seemed to get carried forward for all the other converted calls.

gcc/
PR tree-optimization/97693
* tree-vect-stmts.c (vectorizable_call): Pass the required vectype
to vect_get_vec_defs_for_operand.

gcc/testsuite/
PR tree-optimization/97693
* gcc.dg/vect/pr97693.c: New test.
gcc/testsuite/gcc.dg/vect/pr97693.c [new file with mode: 0644]
gcc/tree-vect-stmts.c