[Bug tree-optimization/33373] [4.3 Regression] ICE in vectorizable_type_demotion, at tree-vect-transform.c:4098

dorit at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Sep 14 20:53:00 GMT 2007



------- Comment #5 from dorit at gcc dot gnu dot org  2007-09-14 20:53 -------
(In reply to comment #4)
> Very similar testcase with the difference that it is not fixed by r128415 and
> makes current trunk segfault in VEC_tree_base_pop():
> void f (unsigned int *d, unsigned int *s, int w)
> {
>   int i;
>   for (i = 0; i < w; ++i)
>     d [i] = s [i] * (unsigned short) (~d [i] >> 24);
> }

this should fix it:

Index: tree-vect-transform.c
===================================================================
*** tree-vect-transform.c       (revision 128501)
--- tree-vect-transform.c       (working copy)
*************** vect_get_vec_defs_for_stmt_copy (enum ve
*** 1938,1944 ****
    vec_oprnd = vect_get_vec_def_for_stmt_copy (dt[0], vec_oprnd);
    VEC_quick_push (tree, *vec_oprnds0, vec_oprnd);

!   if (vec_oprnds1)
      {
        vec_oprnd = VEC_pop (tree, *vec_oprnds1);
        vec_oprnd = vect_get_vec_def_for_stmt_copy (dt[1], vec_oprnd);
--- 1938,1944 ----
    vec_oprnd = vect_get_vec_def_for_stmt_copy (dt[0], vec_oprnd);
    VEC_quick_push (tree, *vec_oprnds0, vec_oprnd);

!   if (vec_oprnds1 && *vec_oprnds1)
      {
        vec_oprnd = VEC_pop (tree, *vec_oprnds1);
        vec_oprnd = vect_get_vec_def_for_stmt_copy (dt[1], vec_oprnd);

(and by the way, I think this is a totally different issue than what this PR
was originally opened for, and should be a separate PR. I think this regression
is due to r128289)


-- 


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



More information about the Gcc-bugs mailing list