Ensure PATTERN_DEF_SEQ is empty before recognising patterns
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 3 Jul 2018 10:04:20 +0000 (10:04 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 3 Jul 2018 10:04:20 +0000 (10:04 +0000)
commit9c58fb7aa5e719a3ce9acd94740371e139c035be
treef1957e6b11012f7e10d291c37bd43bfd7908525f
parentba9728b0349aa6dbfae020b283ed8ca9f073bf1f
Ensure PATTERN_DEF_SEQ is empty before recognising patterns

Various recognisers set PATTERN_DEF_SEQ to null before adding
statements to it, but it should always be null at that point anyway.
This patch asserts for that in vect_pattern_recog_1 and removes
the redundant code.

2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vect-patterns.c (new_pattern_def_seq): Delete.
(vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
(vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
(vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
STMT_VINFO_PATTERN_DEF_SEQ to null here.
(vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
(vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
append_pattern_def_seq instead of new_pattern_def_seq.
(vect_recog_divmod_pattern): Do both of the above.
(vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
is null.

From-SVN: r262337
gcc/ChangeLog
gcc/tree-vect-patterns.c