Re: RFA: PATCH to match.pd for c++/68385

2015-11-24 Thread Richard Biener
On Mon, Nov 23, 2015 at 8:05 PM, Jason Merrill wrote: > On 11/21/2015 01:30 AM, Richard Biener wrote: >> >> What happens if we remove the nops stripping from integer_zerop? Do other >> integer predicates strip nops? > > > Many predicates do, but removing that doesn't break

Re: RFA: PATCH to match.pd for c++/68385

2015-11-23 Thread Richard Biener
On Sat, Nov 21, 2015 at 7:57 PM, Marc Glisse wrote: > On Sat, 21 Nov 2015, Richard Biener wrote: > >> On November 20, 2015 8:58:15 PM GMT+01:00, Jason Merrill >> wrote: >>> >>> In this bug, we hit the (A & sign-bit) != 0 -> A < 0 transformation. >>>

Re: RFA: PATCH to match.pd for c++/68385

2015-11-23 Thread Jason Merrill
On 11/21/2015 01:30 AM, Richard Biener wrote: What happens if we remove the nops stripping from integer_zerop? Do other integer predicates strip nops? Many predicates do, but removing that doesn't break anything in the testsuite. So, how about this? commit

Re: RFA: PATCH to match.pd for c++/68385

2015-11-21 Thread Marc Glisse
On Sat, 21 Nov 2015, Richard Biener wrote: On November 20, 2015 8:58:15 PM GMT+01:00, Jason Merrill wrote: In this bug, we hit the (A & sign-bit) != 0 -> A < 0 transformation. Because of delayed folding, the operands aren't fully folded yet, so we have NOP_EXPRs around

RFA: PATCH to match.pd for c++/68385

2015-11-20 Thread Jason Merrill
In this bug, we hit the (A & sign-bit) != 0 -> A < 0 transformation. Because of delayed folding, the operands aren't fully folded yet, so we have NOP_EXPRs around INTEGER_CSTs, and so calling wi::only_sign_bit_p ICEs. We've been seeing several similar bugs, where code calls integer_zerop and

Re: RFA: PATCH to match.pd for c++/68385

2015-11-20 Thread Jason Merrill
On 11/20/2015 02:58 PM, Jason Merrill wrote: OK if testing passes? Which it did. Jason

Re: RFA: PATCH to match.pd for c++/68385

2015-11-20 Thread Richard Biener
On November 20, 2015 8:58:15 PM GMT+01:00, Jason Merrill wrote: >In this bug, we hit the (A & sign-bit) != 0 -> A < 0 transformation. >Because of delayed folding, the operands aren't fully folded yet, so we > >have NOP_EXPRs around INTEGER_CSTs, and so calling