[Beignet] [PATCH 1/2] GBE: fix a regression caused by the negative index handling patch.
Song, Ruiling
ruiling.song at intel.com
Mon Dec 1 23:14:35 PST 2014
Yes, the TypeIndex already contains the sign bit. No need to multiply the step. Looks good.
> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> Zhigang Gong
> Sent: Tuesday, December 02, 2014 2:07 PM
> To: beignet at lists.freedesktop.org
> Cc: Gong, Zhigang
> Subject: [Beignet] [PATCH 1/2] GBE: fix a regression caused by the negative
> index handling patch.
>
> The typeIndex is correct and should not mutiply the step.
>
> Signed-off-by: Zhigang Gong <zhigang.gong at intel.com>
> ---
> backend/src/llvm/llvm_passes.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/backend/src/llvm/llvm_passes.cpp
> b/backend/src/llvm/llvm_passes.cpp
> index 0f61526..24ad9d0 100644
> --- a/backend/src/llvm/llvm_passes.cpp
> +++ b/backend/src/llvm/llvm_passes.cpp
> @@ -292,7 +292,7 @@ namespace gbe
> uint32_t elementSize = getTypeByteSize(unit, elementType);
> uint32_t align = getAlignmentByte(unit, elementType);
> elementSize += getPadding(elementSize, align);
> - offset += elementSize * TypeIndex * step;
> + offset += elementSize * TypeIndex;
> }
> } else {
> for(int32_t ty_i=0; ty_i != TypeIndex; ty_i += step)
> --
> 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