Because the ranges of PTX special registers depend on subtarget (-target-cpu), we will have clang attach range metadata to these intrinsics and have the optimizer pick up these metadata. The second part is committed in r211281 (D4187). Will work on the first part. http://reviews.llvm.org/D4150