[Beignet] [PATCH] Fix a HSW regression.

Zhigang Gong zhigang.gong at linux.intel.com
Thu Oct 16 21:31:14 PDT 2014


Right, this is a ISA restrication. Then we have to use DWORD to represent this
value. Just pushed this patch, thanks.

On Fri, Oct 17, 2014 at 02:29:56AM +0000, Yang, Rong R wrote:
> slmoffset is used as dst in DWord logical instruction, such as shift.
> In such instruction, dst register must larger than src register, change slmoffset to Word may have potential issue. So it better to use DWord.
> 
> -----Original Message-----
> From: Zhigang Gong [mailto:zhigang.gong at linux.intel.com] 
> Sent: Thursday, October 16, 2014 14:30
> To: Yang, Rong R
> Cc: beignet at lists.freedesktop.org
> Subject: Re: [Beignet] [PATCH] Fix a HSW regression.
> 
> Good catch yang rong, but this doesn't look like a regression itself.
> It has been there from the beginning. And considering that the total SLM size is only 64K, so a unsigned WORD should be good enough for it right?
> 
> We may need to fix the related code in the gen_insn_selection.cpp and gen75_context.cpp.
> 
> Last time I visited these special register allocations/definitions, I thought we lack of sanity check here and may allocate incorrect register space at backend which is very hard to debug.
> 
> We may need to add some sanity check between here and the actual special register allocation and usage places to make sure those registers are allocated correctly.
> 
> Any thought?
> 
> 
> On Thu, Oct 16, 2014 at 11:07:37AM +0800, Yang Rong wrote:
> > slmoffset use as DWORD register, but declare WORD, fix it.
> > 
> > Signed-off-by: Yang Rong <rong.r.yang at intel.com>
> > ---
> >  backend/src/ir/profile.cpp | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/backend/src/ir/profile.cpp b/backend/src/ir/profile.cpp 
> > index 57cce4b..295b612 100644
> > --- a/backend/src/ir/profile.cpp
> > +++ b/backend/src/ir/profile.cpp
> > @@ -83,7 +83,7 @@ namespace ir {
> >        DECL_NEW_REG(FAMILY_DWORD, zero, 1);
> >        DECL_NEW_REG(FAMILY_DWORD, one, 1);
> >        DECL_NEW_REG(FAMILY_WORD, retVal, 1);
> > -      DECL_NEW_REG(FAMILY_WORD, slmoffset, 1);
> > +      DECL_NEW_REG(FAMILY_DWORD, slmoffset, 1);
> >        DECL_NEW_REG(FAMILY_DWORD, printfbptr, 1);
> >        DECL_NEW_REG(FAMILY_DWORD, printfiptr, 1);
> >        DECL_NEW_REG(FAMILY_DWORD, invalid, 1);
> > --
> > 1.9.1
> > 
> > _______________________________________________
> > Beignet mailing list
> > Beignet at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list