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: fold-const patch for PR41442


On 04/25/2010 09:59 AM, Paolo Bonzini wrote:
> On 04/24/2010 07:39 PM, Bernd Schmidt wrote:
>> This implements the folding requested in PR41442, i.e.:
>>
>>    if ((p1->next&&  !p2->next) || p2->next)
>>
>> to
>>
>>    if (p1->next || p2->next)
>>
>> Bootstrapped and regression tested on i686-linux.  Ok?
> 
> This would also apply for TRUTH_AND_EXPR and TRUTH_OR_EXPR, since you
> rule out side-effecting expressions, no?

It would, and also BIT_AND and BIT_IOR.  I couldn't find a test case in
my collection of input files where it mattered, and I guess in the
absence of control flow it should probably be done in simplify-rtx.


Bernd


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