]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/122577 - missed vectorization of conversion from bool master trunk
authorRichard Biener <rguenther@suse.de>
Thu, 6 Nov 2025 13:24:34 +0000 (14:24 +0100)
committerRichard Biener <rguenther@suse.de>
Fri, 7 Nov 2025 13:20:26 +0000 (14:20 +0100)
commitbc10ba9c33bb0cef335e8e0072e638fd4d404337
treeca16b39fbdccbef4295e43e1f9cf743b2fa247cf
parent0376ac1da3d9125276c427dcb17b2d7db2cbe18f
tree-optimization/122577 - missed vectorization of conversion from bool

We are currently overly restrictive with rejecting conversions from
bit-precision entities to mode precision ones.  Similar to RTL expansion
we can focus on non-bit operations producing bit-precision results
which we currently do not properly handle by masking.  Such checks
should be already present.  The following relaxes vectorizable_conversion.

Actual bitfield accesses are catched and rejected by vectorizer dataref
analysis and converted during if-conversion into mode-size accesses
with appropriate sign- or zero-extension.

PR tree-optimization/122577
* tree-vect-stmts.cc (vectorizable_conversion): Allow conversions
from non-mode-precision types.

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