GBE: Fixed a 3 elements vector load/store bug.
authorZhigang Gong <zhigang.gong@linux.intel.com>
Fri, 31 May 2013 02:09:56 +0000 (10:09 +0800)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Fri, 31 May 2013 07:21:39 +0000 (15:21 +0800)
commit9c2f56daae96f51e39d4f504d84e5ef59bea77b5
treeb7df440daa6599ad9e0407a7955c7047e78a05e7
parent8866634b02d4230c723c3c9449341ee749a0e2a4
GBE: Fixed a 3 elements vector load/store bug.

Per OpenCL spec, for 3-component vector data types,the
size of the data type is 4 * sizeof(component). And llvm
FE really cast a type3 data to type4 data for load/store
instruction, thus break our implementation. We need to
fixup it to the actual element size.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
backend/src/llvm/llvm_gen_backend.cpp
kernels/compiler_vector_load_store.cl
utests/compiler_vector_load_store.cpp