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]

Re: [PATCH] Fix tree-opt/29059, ICE with the recent builtins improvements


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.


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