[Beignet] [PATCH] Fix bug for scalar long conversion.

Yang, Rong R rong.r.yang at intel.com
Sun Jan 25 23:11:15 PST 2015


LGTM, thanks.

> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> junyan.he at inbox.com
> Sent: Monday, January 26, 2015 13:54
> To: beignet at lists.freedesktop.org
> Cc: Junyan He
> Subject: [Beignet] [PATCH] Fix bug for scalar long conversion.
> 
> From: Junyan He <junyan.he at linux.intel.com>
> 
> The following instruction:
>   mov (1) r127.7<1>:f  r8.2<0;1,0>:q
> can not work because the dst should have same alignment with the source,
> which will cause the conversion error.
> 
> Signed-off-by: Junyan He <junyan.he at linux.intel.com>
> ---
>  backend/src/backend/gen_insn_selection.cpp | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/backend/src/backend/gen_insn_selection.cpp
> b/backend/src/backend/gen_insn_selection.cpp
> index 628fa2f..bdf7c55 100644
> --- a/backend/src/backend/gen_insn_selection.cpp
> +++ b/backend/src/backend/gen_insn_selection.cpp
> @@ -3998,12 +3998,8 @@ namespace gbe
>          } else {
>            GenRegister unpacked;
>            const uint32_t type = GEN_TYPE_F;
> -          if (!sel.isScalarReg(dst.reg())) {
> -            unpacked = sel.unpacked_ud(sel.reg(FAMILY_QWORD,
> sel.isScalarReg(insn.getSrc(0))));
> -            unpacked = GenRegister::retype(unpacked, type);
> -          } else {
> -            unpacked = GenRegister::retype(sel.unpacked_ud(dst.reg()), type);
> -          }
> +          unpacked = sel.unpacked_ud(sel.reg(FAMILY_QWORD,
> sel.isScalarReg(insn.getSrc(0))));
> +          unpacked = GenRegister::retype(unpacked, type);
> 
>            sel.push();
>              if (sel.isScalarReg(insn.getSrc(0))) {
> --
> 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