IR: Set a TargetPrefix for nvvm intrinsics

Since these are named nvvm_* rather than nvptx_*, we also need to
update getArchTypePrefix. It's a bit unusual for getArchTypePrefix not
to match the backend name, but I think this fits the intent of the
function in this case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274890 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Justin Bogner 2016-07-08 17:25:18 +00:00
parent 5475a5b9cd
commit 6973077b3a
2 changed files with 5 additions and 2 deletions

View File

@ -17,6 +17,7 @@ def llvm_anyi64ptr_ty : LLVMAnyPointerType<llvm_i64_ty>; // (space)i64*
// MISC
//
let TargetPrefix = "nvvm" in {
def int_nvvm_clz_i : GCCBuiltin<"__nvvm_clz_i">,
Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoMem]>;
def int_nvvm_clz_ll : GCCBuiltin<"__nvvm_clz_ll">,
@ -3730,3 +3731,4 @@ def int_nvvm_shfl_idx_f32 :
Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_i32_ty, llvm_i32_ty],
[IntrNoMem, IntrConvergent], "llvm.nvvm.shfl.idx.f32">,
GCCBuiltin<"__nvvm_shfl_idx_f32">;
}

View File

@ -114,8 +114,9 @@ const char *Triple::getArchTypePrefix(ArchType Kind) {
case xcore: return "xcore";
case nvptx: return "nvptx";
case nvptx64: return "nvptx";
// NVPTX intrinsics are namespaced under nvvm.
case nvptx: return "nvvm";
case nvptx64: return "nvvm";
case le32: return "le32";
case le64: return "le64";