tree-optimization/97706 - handle PHIs in pattern recog mask precison
authorRichard Biener <rguenther@suse.de>
Thu, 5 Nov 2020 11:34:42 +0000 (12:34 +0100)
committerRichard Biener <rguenther@suse.de>
Fri, 6 Nov 2020 14:00:37 +0000 (15:00 +0100)
commit22175d0dc6a89ddd630f19d0f32a2d1ddb046807
treeaed64ec1f9738c46975c3ab1d927346e2b4b9bfa
parent1db815f4f38be2028ab386b2a5e5e43a88280d21
tree-optimization/97706 - handle PHIs in pattern recog mask precison

This adds handling of PHIs to mask precision compute which is
eventually needed to detect a bool pattern when the def chain
contains such a PHI node.

2020-11-06  Richard Biener  <rguenther@suse.de>

PR tree-optimization/97706
* tree-vect-patterns.c (possible_vector_mask_operation_p):
PHIs are possible mask operations.
(vect_determine_mask_precision): Handle PHIs.
(vect_determine_precisions): Walk PHIs in BB analysis.

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