Specifically, we upgrade llvm.nvvm.:
- brev{32,64}
- clz.{i,ll}
- popc.{i,ll}
- abs.{i,ll}
- {min,max}.{i,ll,u,ull}
- h2f
These either map directly to an existing LLVM target-generic
intrinsic or map to a simple LLVM target-generic idiom.
In all cases, we check that the code we generate is lowered to PTX as we
expect.
This patch also adds implementations of the corresponding builtins to
clang.
There are still remnants of __nvvm_{brev,abs,clz,...} in include/clang/Basic/BuiltinsNVPTX.def
Now that llvm does not provide them, they should be removed from clang as well, IMO.