tree-optimization/102572 - fix gathers with invariant mask
authorRichard Biener <rguenther@suse.de>
Tue, 12 Oct 2021 11:42:08 +0000 (13:42 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 12 Oct 2021 12:49:44 +0000 (14:49 +0200)
commit9f12a45ef147e563f099c24c293830727e8204cc
tree0180467afd7a85963a2a9889f0e72b35a6c9b1bf
parente36206c9940d224637083f2e91bd4c70f4b7dd20
tree-optimization/102572 - fix gathers with invariant mask

This fixes the vector def gathering for invariant masks which
failed to pass in the desired vector type resulting in a non-mask
type to be generate.

2021-10-12  Richard Biener  <rguenther@suse.de>

PR tree-optimization/102572
* tree-vect-stmts.c (vect_build_gather_load_calls): When
gathering the vectorized defs for the mask pass in the
desired mask vector type so invariants will be handled
correctly.

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