summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@intel.com>2014-12-02 13:15:31 +0800
committerZhigang Gong <zhigang.gong@intel.com>2014-12-02 17:01:06 +0800
commitf892b6e05bee640d786840a7b6efee5a13dcaa8c (patch)
treee33b3c730e67bcef978d353f827dbd0e525e83a1
parentdd5cc66c00445b6f7b3bdc96e07896338a8ff270 (diff)
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@intel.com> Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
-rw-r--r--backend/src/llvm/llvm_passes.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/src/llvm/llvm_passes.cpp b/backend/src/llvm/llvm_passes.cpp
index 0f61526d..24ad9d0e 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)