[Beignet] [PATCH 1/2] fix dnetc overflow issue.

Zhigang Gong zhigang.gong at linux.intel.com
Tue Dec 2 01:45:11 PST 2014


The patchset LGTM, pushed, thanks.


On Tue, Dec 02, 2014 at 03:58:55PM +0800, xionghu.luo at intel.com wrote:
> From: Luo Xionghu <xionghu.luo at intel.com>
> 
> the overflow type should be unsigned for uadd_with_overflow.
> this patch fixed the "dnetc -test rc5-72 0" 15 fails out of
> 32 when disabled bswap.
> 
> Signed-off-by: Luo Xionghu <xionghu.luo at intel.com>
> ---
>  backend/src/llvm/llvm_gen_backend.cpp |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/backend/src/llvm/llvm_gen_backend.cpp b/backend/src/llvm/llvm_gen_backend.cpp
> index 3d74a0a..7f92658 100644
> --- a/backend/src/llvm/llvm_gen_backend.cpp
> +++ b/backend/src/llvm/llvm_gen_backend.cpp
> @@ -2980,7 +2980,8 @@ namespace gbe
>              ctx.ADD(dst0Type, dst0, src0, src1);
>  
>              ir::Register overflow = this->getRegister(&I, 1);
> -            ctx.LT(dst0Type, overflow, dst0, src1);
> +            const ir::Type unsignedType = makeTypeUnsigned(dst0Type);
> +            ctx.LT(unsignedType, overflow, dst0, src1);
>            }
>            break;
>            case Intrinsic::usub_with_overflow:
> -- 
> 1.7.9.5
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list