Re: [PATCH] Fix PR77407

2016-11-02 Thread Richard Biener
On Tue, 1 Nov 2016, Marc Glisse wrote: > On Mon, 31 Oct 2016, Richard Biener wrote: > > > On Fri, 28 Oct 2016, Marc Glisse wrote: > > > > > On Wed, 28 Sep 2016, Richard Biener wrote: > > > > > > > The following patch implements patterns to catch x / abs (x) > > > > and x / -x, taking advantage

Re: [PATCH] Fix PR77407

2016-11-01 Thread Marc Glisse
On Mon, 31 Oct 2016, Richard Biener wrote: On Fri, 28 Oct 2016, Marc Glisse wrote: On Wed, 28 Sep 2016, Richard Biener wrote: The following patch implements patterns to catch x / abs (x) and x / -x, taking advantage of undefinedness at x == 0 as opposed to the PR having testcases with

Re: [PATCH] Fix PR77407

2016-10-31 Thread Richard Biener
On Fri, 28 Oct 2016, Marc Glisse wrote: > On Wed, 28 Sep 2016, Richard Biener wrote: > > > The following patch implements patterns to catch x / abs (x) > > and x / -x, taking advantage of undefinedness at x == 0 as > > opposed to the PR having testcases with explicit != 0 checks. > > > >

Re: [PATCH] Fix PR77407

2016-10-28 Thread Marc Glisse
On Wed, 28 Sep 2016, Richard Biener wrote: The following patch implements patterns to catch x / abs (x) and x / -x, taking advantage of undefinedness at x == 0 as opposed to the PR having testcases with explicit != 0 checks. Bootstrap / regtest pending on x86_64-unknown-linux-gnu. Richard.

Re: [PATCH] Fix PR77407

2016-10-04 Thread Richard Biener
On Sat, 1 Oct 2016, Marc Glisse wrote: > On Wed, 28 Sep 2016, Richard Biener wrote: > > > --- gcc/match.pd(revision 240565) > > +++ gcc/match.pd(working copy) > > @@ -147,12 +147,25 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) > > (op @0 integer_onep) > > (non_lvalue @0))) > > > >

Re: [PATCH] Fix PR77407

2016-10-01 Thread Marc Glisse
On Wed, 28 Sep 2016, Richard Biener wrote: --- gcc/match.pd(revision 240565) +++ gcc/match.pd(working copy) @@ -147,12 +147,25 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (op @0 integer_onep) (non_lvalue @0))) -/* X / -1 is -X. */ (for div (trunc_div ceil_div floor_div

Re: [PATCH] Fix PR77407

2016-10-01 Thread Richard Biener
On October 1, 2016 11:47:45 AM GMT+02:00, Robin Dapp wrote: >This introduces an ICE ("bogus comparison result type") on s390 for the >following test case: > >#include > >void foo(int dim) >{ > int ba, sign; > > ba = abs (dim); > sign = dim / ba; >} > > >Doing >

Re: [PATCH] Fix PR77407

2016-10-01 Thread Robin Dapp
This introduces an ICE ("bogus comparison result type") on s390 for the following test case: #include void foo(int dim) { int ba, sign; ba = abs (dim); sign = dim / ba; } Doing diff --git a/gcc/match.pd b/gcc/match.pd index ba7e013..2455592 100644 --- a/gcc/match.pd +++

[PATCH] Fix PR77407

2016-09-28 Thread Richard Biener
The following patch implements patterns to catch x / abs (x) and x / -x, taking advantage of undefinedness at x == 0 as opposed to the PR having testcases with explicit != 0 checks. Bootstrap / regtest pending on x86_64-unknown-linux-gnu. Richard. 2016-09-28 Richard Biener