http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51606

Ira Rosen <irar at il dot ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-12-18
                 CC|                            |irar at il dot ibm.com
     Ever Confirmed|0                           |1

--- Comment #1 from Ira Rosen <irar at il dot ibm.com> 2011-12-18 11:41:41 UTC 
---
Caused by 
r182388 | jakub | 2011-12-15 22:47:29 +0200 (Thu, 15 Dec 2011) | 27 lines

        * tree-vectorizer.h (struct _stmt_vec_info): Remove pattern_def_stmt
        field, add pattern_def_seq.
        (STMT_VINFO_PATTERN_DEF_STMT): Remove.
        (STMT_VINFO_PATTERN_DEF_SEQ): Define.
        (NUM_PATTERNS): Bump to 10.
        * tree-vect-loop.c (vect_determine_vectorization_factor,
        vect_transform_loop): Adjust for pattern def changing from a single
        gimple stmt to gimple_seq.
        * tree-vect-stmts.c (vect_analyze_stmt, new_stmt_vec_info,
        free_stmt_vec_info): Likewise.
        * tree-vect-patterns.c (vect_recog_over_widening_pattern,
        vect_recog_vector_vector_shift_pattern,
        vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast,
        adjust_bool_pattern, vect_mark_pattern_stmts): Likewise.
        (vect_recog_sdivmod_pow2_pattern): New function.
        (vect_vect_recog_func_ptrs): Add it.
         ...

And probably PR 51580 is the same problem.

Looking at pr51015.c, vect_recog_vector_vector_shift_pattern is detected and a
new def stmt is created during the detection: 
patt.23_33 = (long long unsigned int) D.2004_3; 
The pattern detection fails later (on the vector type checks probably), but
this stmt remains a use stmt of D.2004_3 = i_25 + -2;.  Therefore, we check
whether it's inside the loop, but get segfault while trying to check its not
existing BB.

Before the use of gimple_seq, this didn't happen, i.e., patt.23_33 = (long long
unsigned int) D.2004_3; wasn't a use of D.2004_3 = i_25 + -2;.

Reply via email to