aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-unswitch.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2018-06-30 12:47:25 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2018-06-30 12:47:25 +0000
commit0f8c840c28c11b13e630b55ad3dc6e0670b4f817 (patch)
treeefcd2c3257bda8e25cd2751ce3e03e53029f58a1 /gcc/tree-ssa-loop-unswitch.c
parent894dd753ca8a4120078324cc6cf0ba01afff9cab (diff)
downloadgcc-0f8c840c28c11b13e630b55ad3dc6e0670b4f817.zip
gcc-0f8c840c28c11b13e630b55ad3dc6e0670b4f817.tar.gz
gcc-0f8c840c28c11b13e630b55ad3dc6e0670b4f817.tar.bz2
[9b/n] PR85694: Make vect_is_simple_use look through pattern statements
As suggested by Richard B., this patch makes vect_is_simple_use check whether a defining statement has been replaced by a pattern statement, and if so returns the pattern statement instead. The reason for doing this is that the main patch for PR85694 makes over_widening handle more general cases. These over-widened patterns can still be useful when matching later statements; e.g. an overwidened MULT_EXPR could be the input to a DOT_PROD_EXPR. The patch doesn't do anything with the STMT_VINFO_IN_PATTERN_P checks in vect_recog_over_widening_pattern or vect_recog_widen_shift_pattern since later patches rewrite them anyway. Doing this fixed an XFAIL in vect-reduc-dot-u16b.c. 2018-06-30 Richard Sandiford <richard.sandiford@arm.com> gcc/ * tree-vect-loop.c (vectorizable_reduction): Assert that the phi is not a pattern statement and has not been replaced by a pattern statement. * tree-vect-patterns.c (type_conversion_p): Don't check STMT_VINFO_IN_PATTERN_P. (vect_recog_vector_vector_shift_pattern): Likewise. (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return the pattern statement rather than the original statement; check directly for a WIDEN_MULT_EXPR here. * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect vect_is_simple_use to return the pattern statement rather than the original statement; use is_pattern_stmt_p to check for such a pattern statement. * tree-vect-stmts.c (process_use): Expect vect_is_simple_use to return the pattern statement rather than the original statement; don't do the same transformation here. (vect_is_simple_use): If the defining statement has been replaced by a pattern statement, return the pattern statement instead. Remove the corresponding (local) transformation from the vectype overload. gcc/testsuite/ * gcc.dg/vect/vect-reduc-dot-u16b.c: Remove xfail and update the test for vectorization along the lines described in the comment. From-SVN: r262273
Diffstat (limited to 'gcc/tree-ssa-loop-unswitch.c')
0 files changed, 0 insertions, 0 deletions