This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix tree-opt/29059, ICE with the recent builtins improvements
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: Andrew Pinski <pinskia at physics dot uc dot edu>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 18 Sep 2006 15:15:17 -0400
- Subject: Re: [PATCH] Fix tree-opt/29059, ICE with the recent builtins improvements
- References: <Pine.LNX.4.44.0609161103050.13324-100000@www.eyesopen.com>
Roger Sayle wrote on 09/16/06 13:13:
> Hi Andrew,
>
> On Thu, 14 Sep 2006, Andrew Pinski wrote:
>> * tree-ssa-propagate.c (set_rhs): Reject MODIFY_EXPR right
>> away for the expr argument.
>>
>> * gcc.c-torture/compile/strcpy-1.c: New test.
>> * gcc.c-torture/compile/strcpy-2.c: New test.
>> * gcc.c-torture/compile/memcpy-1.c: New test.
>> * gcc.c-torture/compile/memcpy-2.c: New test.
>
> This is OK for mainline. Thanks.
>
Not OK.
Add a check for !is_gimple_val. You are pessimizing unnecessarily.
It's perfectly alright to replace a builtin call with a MODIFY_EXPR, if
the RHS of the MODIFY_EXPR is a gimple_val.
I thought we may want to re-gimplify here, but it would be a hack.
Better get the builtin folders to return valid GIMPLE.