[Beignet] [PATCH] fix operators for 64 bit integer
Zhigang Gong
zhigang.gong at linux.intel.com
Mon Nov 4 07:58:57 CET 2013
LGTM, will push latter. Thanks.
On Mon, Nov 04, 2013 at 09:39:33AM +0800, Homer Hsing wrote:
> if operand is signed 64 bit integer, emit -1 for SExt casting
>
> Signed-off-by: Homer Hsing <homer.xing at intel.com>
> ---
> backend/src/llvm/llvm_gen_backend.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/backend/src/llvm/llvm_gen_backend.cpp b/backend/src/llvm/llvm_gen_backend.cpp
> index 6f4ed72..b824bf9 100644
> --- a/backend/src/llvm/llvm_gen_backend.cpp
> +++ b/backend/src/llvm/llvm_gen_backend.cpp
> @@ -1694,7 +1694,7 @@ namespace gbe
> const ir::ImmediateIndex zero = ctx.newIntegerImmediate(0, dstType);
> ir::ImmediateIndex one;
> if (I.getOpcode() == Instruction::SExt
> - && (dstType == ir::TYPE_S8 || dstType == ir::TYPE_S16 || dstType == ir::TYPE_S32))
> + && (dstType == ir::TYPE_S8 || dstType == ir::TYPE_S16 || dstType == ir::TYPE_S32 || dstType == ir::TYPE_S64))
> one = ctx.newIntegerImmediate(-1, dstType);
> else
> one = ctx.newIntegerImmediate(1, dstType);
> --
> 1.8.3.2
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list