[Bug target/77826] [7 Regression] ICE in decompose, at wide-int.h:928 w/ -m64 -O2 and above

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Oct 4 10:48:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77826

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #3)
> --- gcc/genmatch.c      (revision 240739)
> +++ gcc/genmatch.c      (working copy)
> @@ -2593,8 +2601,10 @@ dt_operand::gen_match_op (FILE *f, int i
>  {
>    char match_opname[20];
>    match_dop->get_name (match_opname);
> -  fprintf_indent (f, indent, "if (%s == %s || operand_equal_p (%s, %s,
> 0))\n",
> -                 opname, match_opname, opname, match_opname);
> +  fprintf_indent (f, indent, "if (%s == %s || (operand_equal_p (%s, %s, 0) "
> +                 "&& types_match (%s, %s)))\n",
> +                 opname, match_opname, opname, match_opname,
> +                 opname, match_opname);
>    fprintf_indent (f, indent + 2, "{\n");
>    return 1;
>  }

But that will mean the pattern will no longer match.  While it is generally
safer, for the cases like this simplify, shall it then use (convert? @2)
instead and add operand_equal_p for @0 and @2?  I guess all it cares is that @0
actually has the same type as @1 there, not a different one?


More information about the Gcc-bugs mailing list