This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix vectorizer ICE when building Mozilla
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org, rguenther at suse dot de, matz at suse dot de
- Date: Mon, 23 Apr 2012 01:04:40 +0200
- Subject: 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;