Yes, the TypeIndex already contains the sign bit. No need to multiply the step. Looks good.
> -----Original Message----- > From: Beignet [mailto:[email protected]] On Behalf Of > Zhigang Gong > Sent: Tuesday, December 02, 2014 2:07 PM > To: [email protected] > 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 <[email protected]> > --- > 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 > [email protected] > http://lists.freedesktop.org/mailman/listinfo/beignet _______________________________________________ Beignet mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/beignet
