Files
clang-p2996/libclc/generic/include/clc/integer/rhadd.inc
Aaron Watry 8548725f29 Add rhadd builtin
rhadd = (x+y+1)>>1

Implemented as:
(x>>1) + (y>>1) + ((x&1)|(y&1))

This prevents us having to do assembly addition and overflow detection

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 188477
2013-08-15 19:21:10 +00:00

2 lines
79 B
C++

_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE rhadd(__CLC_GENTYPE x, __CLC_GENTYPE y);