There are many difference between D and UD.
It is ugly to handle them in one if

-----Original Message-----
From: Yang, Rong R 
Sent: Tuesday, July 4, 2017 7:42 AM
To: Wang, Rander <rander.w...@intel.com>; inte...@intelfx.name; 
beignet@lists.freedesktop.org
Cc: Song, Ruiling <ruiling.s...@intel.com>
Subject: RE: [Beignet] [PATCH V4] backend: add global immediate optimization

GEN is support mixed type instructions, mixed UD and UW. For example, UD * UW.
How about handle the U/UD in one if branch?

> -----Original Message-----
> From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf 
> Of Wang, Rander
> Sent: Monday, July 3, 2017 9:33
> To: inte...@intelfx.name; beignet@lists.freedesktop.org
> Cc: Song, Ruiling <ruiling.s...@intel.com>
> Subject: Re: [Beignet] [PATCH V4] backend: add global immediate 
> optimization
> 
> For D + UD,   D is considered as UD by HW.
> 
> -----Original Message-----
> From: Ivan Shapovalov [mailto:inte...@intelfx.name]
> Sent: Saturday, July 1, 2017 2:26 AM
> To: Wang, Rander <rander.w...@intel.com>; 
> beignet@lists.freedesktop.org
> Cc: Song, Ruiling <ruiling.s...@intel.com>
> Subject: Re: [Beignet] [PATCH V4] backend: add global immediate 
> optimization
> 
> On 2017-06-30 at 15:36 +0300, Ivan Shapovalov wrote:
> > On 2017-06-30 at 01:46 +0000, Wang, Rander wrote:
> > > Hi,
> > >
> > >   The abs of UD has to be done if it is encoded in instruction no 
> > > matter it make sense or not.
> > >     And I have discussed with my collage and refine it.
> > >     First we inspect the HW behavior of ABS(UD), -(UD) and find 
> > > that
> > > ABS(UD) = UD,
> > >     -(UD) = the result of -(UD) on CPU.
> > >
> > >   So the abs calculation can be removed and this will make it 
> > > compiled pass.
> > >
> > > Rander
> >
> > Hi,
> >
> > OK, but what about reading from .value.ud if the corresponding .type 
> > is not GEN_TYPE_UD? Is this a concern? Which operand type 
> > combinations are possible?
> >
> 
> I mean, due to an || in the conditional it looks like it is possible 
> for either of the operands to not be a GEN_TYPE_D. Suppose the first 
> operand is a signed dword (GEN_TYPE_D) that holds a negative value and 
> has the ABS flag. In this case the new code will yield a significantly wrong 
> result. Is this possible?
> 
> --
> Ivan Shapovalov / intelfx /
> _______________________________________________
> Beignet mailing list
> Beignet@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/beignet
_______________________________________________
Beignet mailing list
Beignet@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to