Re: [PATCH GCC][2/3]Simplify ((A +- CST1 CMP A +- CST2)) for undefined overflow type

2017-10-19 Thread Bin.Cheng
On Thu, Oct 19, 2017 at 4:33 PM, Marc Glisse wrote: > On Thu, 19 Oct 2017, Bin Cheng wrote: > >> * match.pd (A +- CST1 CMP A +- CST2): New pattern. > > > Similarly, this has a very large overlap with "X + Z < Y + Z" transforms > already in match.pd. It may handle X -

Re: [PATCH GCC][2/3]Simplify ((A +- CST1 CMP A +- CST2)) for undefined overflow type

2017-10-19 Thread Marc Glisse
On Thu, 19 Oct 2017, Bin Cheng wrote: * match.pd (A +- CST1 CMP A +- CST2): New pattern. Similarly, this has a very large overlap with "X + Z < Y + Z" transforms already in match.pd. It may handle X - CST CMP X + CST that the other doesn't (?), but we tend to canonicalize X-5 to

[PATCH GCC][2/3]Simplify ((A +- CST1 CMP A +- CST2)) for undefined overflow type

2017-10-19 Thread Bin Cheng
Hi, This patch adds pattern simplifying (A +- CST1 CMP A +- CST2) for undefined overflow types. Bootstrap and test for patch set on x86_64 and AArch64. Comments? Thanks, bin 2017-10-16 Bin Cheng * match.pd (A +- CST1 CMP A +- CST2): New pattern.From