[NVPTX] Adding __nvvm_ builtins index

Hi Justin,

As we discussed earlier, Clang intrinsics table misses _nvvm buitins, what prevent frontend from recognizing them in the suppiled source code, e.g. nvvm/ci_include.h
The attached patch adds the list of intrinsics. Some of them are commented out, because backend does not implement them yet.

OK to commit?

  • D.

clang.nvptx.builtins.patch (10.9 KB)

Bug: http://llvm.org/bugs/show_bug.cgi?id=13354

2012/7/12 Dmitry N. Mikushin <maemarcus@gmail.com>

The patch looks good, but please provide some test cases (see test/CodeGen/ in Clang for examples). It can just be a simple test that makes sure Clang does not error out for these built-ins.