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]

[PATCH][match-and-simplify] Fix ICE


This fixes an ICE that occurs when valueziation returns NULL and
we are looking at single-rhs REALPART_EXPR.  We should check
for is_gimple_min_invariant before valueization.

Bootstrapped on x86_64-unknown-linux-gnu, applied.

Richard.

2014-10-14  Richard Biener  <rguenther@suse.de>

	* genmatch.c (dt_operand::gen_gimple_expr): Check for an
	invariant operand before valueizing it.

Index: gcc/genmatch.c
===================================================================
--- gcc/genmatch.c	(revision 216197)
+++ gcc/genmatch.c	(working copy)
@@ -1566,8 +1566,8 @@ dt_operand::gen_gimple_expr (FILE *f)
 	      fprintf (f, "tree %s = TREE_OPERAND (gimple_assign_rhs1 (def_stmt), %i);\n",
 		       child_opname, i);
 	      fprintf (f, "if ((TREE_CODE (%s) == SSA_NAME\n"
-		       "&& (%s = do_valueize (valueize, %s)))\n"
 		       "|| is_gimple_min_invariant (%s))\n"
+		       "&& (%s = do_valueize (valueize, %s)))\n"
 		       "{\n", child_opname, child_opname, child_opname,
 		       child_opname);
 	      continue;


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