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]

Fix vectorizer ICE when building Mozilla


Hi,
when building Mozilla we ICE in expr_invariant_in_loop_p walking ARRAY_REF, because one of the
fields is NULL (that is allowed)

Bootstrapped/regtested x86_64-linux, OK?

Honza

	* tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Bail out at NULL tree refs.
Index: tree-ssa-loop-ivopts.c
===================================================================
*** tree-ssa-loop-ivopts.c	(revision 186688)
--- tree-ssa-loop-ivopts.c	(working copy)
*************** expr_invariant_in_loop_p (struct loop *l
*** 1411,1417 ****
  
    len = TREE_OPERAND_LENGTH (expr);
    for (i = 0; i < len; i++)
!     if (!expr_invariant_in_loop_p (loop, TREE_OPERAND (expr, i)))
        return false;
  
    return true;
--- 1411,1417 ----
  
    len = TREE_OPERAND_LENGTH (expr);
    for (i = 0; i < len; i++)
!     if (TREE_OPERAND (expr, i) && !expr_invariant_in_loop_p (loop, TREE_OPERAND (expr, i)))
        return false;
  
    return true;


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