[Beignet] [PATCH 1/2] GBE: fix a regression caused by the negative index handling patch.
Zhigang Gong
zhigang.gong at intel.com
Mon Dec 1 22:06:36 PST 2014
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
More information about the Beignet
mailing list