[Beignet] [PATCH] fix uniform case for ByteGather

Zhigang Gong zhigang.gong at linux.intel.com
Thu Oct 15 22:25:05 PDT 2015


LGTM, thx.

On Wed, Oct 14, 2015 at 05:28:51AM +0800, Guo Yejun wrote:
> currently,the ByteGather generates IR as:
>     BYTE_GATHER(16)     %109<0>:UD	:	%96<0,1,0>:UD	0x4:UD
>     MOV(1)              %75<0>:UB	:	%109<32,8,4>:UB
> 
> Fix it to generate IR as:
>     BYTE_GATHER(16)     %109<0>:UD      :       %96<0,1,0>:UD   0x4:UD
>     MOV(1)              %75<0>:UB       :       %109<0,1,0>:UB
> 
> otherwise, there is regression issue of local copy propagation optimization
> which uses %109<32,8,4>:UB
> 
> 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 da437d1..44cc473 100644
> --- a/backend/src/backend/gen_insn_selection.cpp
> +++ b/backend/src/backend/gen_insn_selection.cpp
> @@ -3657,9 +3657,9 @@ namespace gbe
>                sel.curr.execWidth = 1;
>              }
>              if (elemSize == GEN_BYTE_SCATTER_WORD)
> -              sel.MOV(GenRegister::retype(value, GEN_TYPE_UW), GenRegister::unpacked_uw(dst));
> +              sel.MOV(GenRegister::retype(value, GEN_TYPE_UW), GenRegister::unpacked_uw(dst, isUniform));
>              else if (elemSize == GEN_BYTE_SCATTER_BYTE)
> -              sel.MOV(GenRegister::retype(value, GEN_TYPE_UB), GenRegister::unpacked_ub(dst));
> +              sel.MOV(GenRegister::retype(value, GEN_TYPE_UB), GenRegister::unpacked_ub(dst, isUniform));
>            sel.pop();
>          }
>        }
> -- 
> 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