This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[lno] fix verification failure after vectorization



After loop is transformed in vector from, it fails verify_stmts() verification. This patch fixes. It also resets loop->aux which gives malloc/free warnings in loop-iv.c:free_simple_loop_desc().

--
Devang


2004-02-17 Devang Patel <dpatel@apple.com>


* tree-vectorize.c (vect_create_data_ref): Set TREE_ADDRESSABLE bit.
(vectorize_loops): Reset loop->aux.


Index: tree-vectorizer.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-vectorizer.c,v
retrieving revision 1.1.2.15
diff -Idpatel.pbxuser -c -3 -p -r1.1.2.15 tree-vectorizer.c
*** tree-vectorizer.c   26 Jan 2004 17:59:17 -0000      1.1.2.15
--- tree-vectorizer.c   18 Feb 2004 04:03:52 -0000
*************** vect_create_data_ref (tree ref, tree stm
*** 728,733 ****
--- 728,734 ----
    vec_stmt = build (MODIFY_EXPR, ptr_type, array_ptr,
                    build1 (NOP_EXPR, ptr_type,
                            build1 (ADDR_EXPR, ptr_type, base)));
+   TREE_ADDRESSABLE (base) = 1;
    new_temp = make_ssa_name (array_ptr, vec_stmt);
    TREE_OPERAND (vec_stmt, 0) = new_temp;
    bsi_insert_before (bsi, vec_stmt, BSI_SAME_STMT);
*************** vectorize_loops (struct loops *loops,
*** 2962,2966 ****
--- 2963,2968 ----
        struct loop *loop = loops->parray[i];
        loop_vec_info loop_vinfo = loop->aux;
        destroy_loop_vec_info (loop_vinfo);
+       loop->aux = NULL;
      }
  }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]