Make "logical shift right" work
authorHomer Hsing <homer.xing@intel.com>
Fri, 1 Feb 2013 05:48:59 +0000 (13:48 +0800)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Wed, 10 Apr 2013 06:52:32 +0000 (14:52 +0800)
commita985f4e11b21bb3fd2506a4b56c7f06891dbdd16
tree90dd7213d99e944dd78f9a75e94ea075dc2c4216
parentb3e9efd931ce0aa76cdf1480d1b685a5bcae695f
Make "logical shift right" work

Before we fix the bug, the "logical shift right" is wrong:
  (0xFF000000U >> 24) == 0xFFFFFFFF

After we fix the bug, it is right.
  (0xFF000000U >> 24) == 0xFF

Also add a test case, test by 128 random input.

This patch fixes "component_transfer_linear" filter.

Signed-off-by: Homer Hsing <homer.xing@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Tested-by: Zhigang Gong <zhigang.gong@linux.intel.com>
backend/src/llvm/llvm_gen_backend.cpp
kernels/compiler_shift_right.cl [new file with mode: 0644]
utests/CMakeLists.txt
utests/compiler_shift_right.cpp [new file with mode: 0644]