tstellarAMD accepted this revision. tstellarAMD added a comment. This revision is now accepted and ready to land. LGTM. To expose this to OpenCL, we will also need to add the corresponding builtin to clang. http://reviews.llvm.org/D21533