tree-optimization/98211 - fix bogus vectorization of conversion
authorRichard Biener <rguenther@suse.de>
Thu, 10 Dec 2020 10:12:53 +0000 (11:12 +0100)
committerRichard Biener <rguenther@suse.de>
Thu, 10 Dec 2020 11:36:19 +0000 (12:36 +0100)
commit76c09f2af9d8ab9c760d860626f069d12d86f0a9
tree8d65a235ca07924d52b8d5e7953aa44dad9c07f2
parentf2a5e5f3e6d770d16ad3c48c753a952a40c09c16
tree-optimization/98211 - fix bogus vectorization of conversion

Pattern recog incompletely handles some bool cases but we shouldn't
miscompile as a result but not vectorize.  Unfortunately
vectorizable_assignment lets invalid conversions (that
vectorizable_conversion rejects) slip through.  The following
rectifies that.

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

PR tree-optimization/98211
* tree-vect-stmts.c (vectorizable_assignment): Disallow
invalid conversions to bool vector types.

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