amdgcn,popcount: Workaround broken llvm.ctpop intrinsic on some GCN ASICs
authorJan Vesely <jan.vesely@rutgers.edu>
Thu, 8 Mar 2018 18:58:07 +0000 (18:58 +0000)
committerJan Vesely <jan.vesely@rutgers.edu>
Thu, 8 Mar 2018 18:58:07 +0000 (18:58 +0000)
commit04a46bf0a293711db41c26a2652def47d3123fdf
tree4b8bc0357abc334645d25f43283221c6478c9bd1
parent0883c4d3657e8abdfdaf90f49637d4f2b21bd9a1
amdgcn,popcount: Workaround broken llvm.ctpop intrinsic on some GCN ASICs

This is only really needed for VI+ ASICs. However, llvm would cast the value to
i32 for older asics anyway. The proper fix is in LLVM-7 (r326535).
Fixes CTS popcount on carrizo.

Reviewer: Aaron Watry <awatry@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 327044
libclc/amdgcn/lib/SOURCES
libclc/amdgcn/lib/integer/popcount.cl [new file with mode: 0644]
libclc/amdgcn/lib/integer/popcount.inc [new file with mode: 0644]