Re: [RFA] Reimplement canonicalization of comparison arguments in match.pd

2015-06-03 Thread Jeff Law
On 05/30/2015 03:57 AM, Marc Glisse wrote: On Fri, 29 May 2015, Jeff Law wrote: c-common.c::shorten_compare has code to canonicalize the arguments of a comparison so that the constant is the second argument. This patch removes the implementation from c-common.c and instead implements it in mat

Re: [RFA] Reimplement canonicalization of comparison arguments in match.pd

2015-06-03 Thread Jeff Law
On 06/01/2015 05:15 AM, Richard Biener wrote: In addition to what Marc said we'd simplify 1 != 0 immediately anyway (to 1), so I don't think the special-cases should make a difference (and if they do I'd like to see a testcase!). FWIW, I agree -- and across my testfiles I don't see any differenc

Re: [RFA] Reimplement canonicalization of comparison arguments in match.pd

2015-06-02 Thread Jeff Law
On 06/01/2015 05:15 AM, Richard Biener wrote: On Sat, May 30, 2015 at 6:41 AM, Jeff Law wrote: c-common.c::shorten_compare has code to canonicalize the arguments of a comparison so that the constant is the second argument. This patch removes the implementation from c-common.c and instead impl

Re: [RFA] Reimplement canonicalization of comparison arguments in match.pd

2015-06-02 Thread Jeff Law
On 05/30/2015 03:57 AM, Marc Glisse wrote: On Fri, 29 May 2015, Jeff Law wrote: c-common.c::shorten_compare has code to canonicalize the arguments of a comparison so that the constant is the second argument. This patch removes the implementation from c-common.c and instead implements it in mat

Re: [RFA] Reimplement canonicalization of comparison arguments in match.pd

2015-06-01 Thread Richard Biener
On Sat, May 30, 2015 at 6:41 AM, Jeff Law wrote: > > c-common.c::shorten_compare has code to canonicalize the arguments of a > comparison so that the constant is the second argument. This patch removes > the implementation from c-common.c and instead implements it in match.pd. > > Note the match.

Re: [RFA] Reimplement canonicalization of comparison arguments in match.pd

2015-05-30 Thread Marc Glisse
On Fri, 29 May 2015, Jeff Law wrote: c-common.c::shorten_compare has code to canonicalize the arguments of a comparison so that the constant is the second argument. This patch removes the implementation from c-common.c and instead implements it in match.pd. Note the match.pd tries to match t

[RFA] Reimplement canonicalization of comparison arguments in match.pd

2015-05-29 Thread Jeff Law
c-common.c::shorten_compare has code to canonicalize the arguments of a comparison so that the constant is the second argument. This patch removes the implementation from c-common.c and instead implements it in match.pd. Note the match.pd tries to match the prior behavior of shorten_compare