]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/122647 - missing bool pattern for bool -> float conversion
authorRichard Biener <rguenther@suse.de>
Wed, 12 Nov 2025 09:03:23 +0000 (10:03 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 12 Nov 2025 10:20:05 +0000 (11:20 +0100)
commitea5b02407215fb76faafbbbc2be90238d3359545
tree50785f6793bdca3b3ba35bddf1dbc993dac5b34f
parent6947098a34ccc2f64ff52de88a136bc438091c10
tree-optimization/122647 - missing bool pattern for bool -> float conversion

The following adds missing support for bool to float conversion which
can be exposed via C++ __builtin_bit_cast.  It also corrects a too
lose check in vectorizable_conversion which would have resolved the
ICE but left us with the missed optimization.

PR tree-optimization/122647
* tree-vect-stmts.cc (vectorizable_conversion): Fix guard on
bool to non-bool conversion.
* tree-vect-patterns.cc (vect_recog_bool_pattern): Also handle
FLOAT_EXPR from bool.

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