Add hadd builtin
authorAaron Watry <awatry@gmail.com>
Thu, 15 Aug 2013 19:21:07 +0000 (19:21 +0000)
committerAaron Watry <awatry@gmail.com>
Thu, 15 Aug 2013 19:21:07 +0000 (19:21 +0000)
commit7659157f1b926321530a44ce8fc7a39a0360a08e
tree11938d2dda1c9b05ea82dfa1add830f6d0d83e94
parentd18fcc7a227f299f6451e2f630e8a83524ac57b2
Add hadd builtin

(x + y) >> 1 gets changed to:
(x>>1) + (y>>1) + (x&y&1)

Saves us having to do any llvm assembly and overflow checking in the addition.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 188476
libclc/generic/include/clc/clc.h
libclc/generic/include/clc/integer/hadd.h [new file with mode: 0644]
libclc/generic/include/clc/integer/hadd.inc [new file with mode: 0644]
libclc/generic/lib/SOURCES
libclc/generic/lib/integer/hadd.cl [new file with mode: 0644]
libclc/generic/lib/integer/hadd.inc [new file with mode: 0644]