]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/104595 - vectorization of COND_EXPR with bool load
authorRichard Biener <rguenther@suse.de>
Mon, 21 Feb 2022 10:05:58 +0000 (11:05 +0100)
committerRichard Biener <rguenther@suse.de>
Thu, 5 May 2022 08:36:42 +0000 (10:36 +0200)
commit938a02a589dc22cef65bba2b131fc9e4874baddb
tree3475889c560188ce6f9ee28eadcacff6b639ad5e
parentb9b764bce89f104e48f797b33836d66073e73ebb
tree-optimization/104595 - vectorization of COND_EXPR with bool load

The following fixes an omission in bool pattern detection that
makes it fail when check_bool_pattern fails for COND_EXPR.  That's
not what it should do, instead it should still pattern recog
to var != 0 even if no further adjustments to the def chain are
necessary when var is not a mask already.

2022-02-21  Richard Biener  <rguenther@suse.de>

PR tree-optimization/104595
* tree-vect-patterns.cc (vect_recog_bool_pattern): For
COND_EXPR do not fail if check_bool_pattern returns false.

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