On Tue, Oct 27, 2020 at 7:18 AM Andrew MacLeod via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> On 10/27/20 7:23 AM, Christophe Lyon wrote:
> > Hi,
> >
> > On Mon, 26 Oct 2020 at 22:51, Andrew MacLeod via Gcc-patches
> > <gcc-patches@gcc.gnu.org> wrote:
> >> In the core of gori_compute::logical_combine we are suppose to combine
> >> the calculated true and false ranges on each side of  the operation.
> >>
> >> when encountering
> >>
> >> [0,0] =   c_3  | c_4
> >>
> >> we know we only need to consider the FALSE values of the range carried
> >> by c_3 and c_4, but it can be EITHER of those ranges, so we need to
> >> union them together to get the correct result.
> >>
> >> The code was performing an intersection instead, and in this particualr
> >> case, we knew the range carried thru c_3 was alwasy [0,0]  and it was
> >> always varying through c_4....    instead of returning varying,  we were
> >> returning [0,0]  which then caused some folding which was incorrect.
> >>
> >> Fixed by correctly calling union...
> >>
> >> Bootstrapped on x86_64-pc-linux-gnu, no regressions, and pushed.
> >>
> > I think you need to update the testcase and declare
> > long long g = 4073709551615
> > instead of just long, as it causes a warning on 32-bit targets:
> > /gcc/testsuite/gcc.dg/pr97567.c:7:12: warning: overflow in conversion
> > from 'long long int' to 'long int' changes value from '4073709551615'
> > to '2080555007' [-Woverflow]
> >
> > Christophe
> >
> >> Andrew
> >>
> ah, didn't realize the testcase didnt work properly on non 64 bit
> targets...  I'll switch it to long long, that seems to make it work.
>

It works for me.  Can you check it in to unblock my testers?

Thanks.

-- 
H.J.

Reply via email to