[Beignet] [PATCH] do not force float for immediate value load

Guo, Yejun yejun.guo at intel.com
Wed Aug 5 20:02:14 PDT 2015


Yes, thanks.

-----Original Message-----
From: Song, Ruiling 
Sent: Thursday, August 06, 2015 11:00 AM
To: Guo, Yejun; beignet at lists.freedesktop.org
Cc: Guo, Yejun
Subject: RE: [Beignet] [PATCH] do not force float for immediate value load


The patch LGTM. But I think below description is a little clearer.

Use Integer for U32/S32 Immediate load.

Previously we use float type for U32/S32 immediate load from performance perspective, but using integer type would make things clearer and easy to debug.

> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf 
> Of Guo Yejun
> Sent: Wednesday, August 5, 2015 8:39 AM
> To: beignet at lists.freedesktop.org
> Cc: Guo, Yejun
> Subject: [Beignet] [PATCH] do not force float for immediate value load
> 
> float format is used to load immediate value with TYPE_U32/TYPE_S32, 
> actually it is not necessary since it is not a performance sensitive point.
> 
> Signed-off-by: Guo Yejun <yejun.guo at intel.com>
> ---
>  backend/src/backend/gen_insn_selection.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/backend/src/backend/gen_insn_selection.cpp
> b/backend/src/backend/gen_insn_selection.cpp
> index b0ba9e3..0256d24 100644
> --- a/backend/src/backend/gen_insn_selection.cpp
> +++ b/backend/src/backend/gen_insn_selection.cpp
> @@ -3205,8 +3205,8 @@ namespace gbe
>            }
>            sel.MOV(dst, imm.getIntegerValue() ? GenRegister::immuw(0xffff) :
> GenRegister::immuw(0));
>          break;
> -        case TYPE_U32:
> -        case TYPE_S32:
> +        case TYPE_U32: sel.MOV(dst,
> GenRegister::immud(imm.getIntegerValue())); break;
> +        case TYPE_S32: sel.MOV(dst,
> + GenRegister::immd(imm.getIntegerValue())); break;
>          case TYPE_FLOAT:
>            sel.MOV(GenRegister::retype(dst, GEN_TYPE_F),
>                    GenRegister::immf(imm.asFloatValue()));
> --
> 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