add utest for llvm intrinsic call usub_with_overflow funtion.
authorLuo Xionghu <xionghu.luo@intel.com>
Sun, 2 Nov 2014 21:22:04 +0000 (05:22 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Mon, 3 Nov 2014 09:25:24 +0000 (17:25 +0800)
commit9d0897633f8ff15c7c5d9fde2feeec700dddbf5a
tree5fefbfaf5a2e47ce49f6cc50906bee54b8624292
parent65a3d67bd06c480573d885c3c35919247685817c
add utest for llvm intrinsic call usub_with_overflow funtion.

as llvm couldn't recognize the pattern of usub overflow, this usub
with is generated by calling the intrinsic function __builtin_usub_overflow;
also this type of uadd intrinsic funtion couldn't support short/byte type
overflow, we choose another way for the uadd kernel to generate short/byte
overflow.
will send patch to llvm later to fix the 2 issues.

v2: split the patch.

Signed-off-by: Luo Xionghu <xionghu.luo@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
kernels/compiler_overflow.cl
utests/compiler_overflow.cpp