Skip to content

Commit

Permalink
[nvvm] Mark ldu and ldg intrinsics as IntrArgMemOnly.
Browse files Browse the repository at this point in the history
Summary:
Previously these intrinsics were marked as can-read any memory address.
Now they're marked as reading only the pointer they're passed.

Reviewers: rnk

Subscribers: jholewinski, llvm-commits, tra

Differential Revision: http://reviews.llvm.org/D20080

llvm-svn: 268996
  • Loading branch information
Justin Lebar committed May 10, 2016
1 parent 50deb6d commit ca3802b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions llvm/include/llvm/IR/IntrinsicsNVVM.td
Expand Up @@ -799,30 +799,30 @@ def llvm_anyi64ptr_ty : LLVMAnyPointerType<llvm_i64_ty>; // (space)i64*
// pointer's alignment.
def int_nvvm_ldu_global_i : Intrinsic<[llvm_anyint_ty],
[LLVMAnyPointerType<LLVMMatchType<0>>, llvm_i32_ty],
[IntrReadMem, NoCapture<0>],
[IntrReadMem, IntrArgMemOnly, NoCapture<0>],
"llvm.nvvm.ldu.global.i">;
def int_nvvm_ldu_global_f : Intrinsic<[llvm_anyfloat_ty],
[LLVMAnyPointerType<LLVMMatchType<0>>, llvm_i32_ty],
[IntrReadMem, NoCapture<0>],
[IntrReadMem, IntrArgMemOnly, NoCapture<0>],
"llvm.nvvm.ldu.global.f">;
def int_nvvm_ldu_global_p : Intrinsic<[llvm_anyptr_ty],
[LLVMAnyPointerType<LLVMMatchType<0>>, llvm_i32_ty],
[IntrReadMem, NoCapture<0>],
[IntrReadMem, IntrArgMemOnly, NoCapture<0>],
"llvm.nvvm.ldu.global.p">;

// Generated within nvvm. Use for ldg on sm_35 or later. Second arg is the
// pointer's alignment.
def int_nvvm_ldg_global_i : Intrinsic<[llvm_anyint_ty],
[LLVMAnyPointerType<LLVMMatchType<0>>, llvm_i32_ty],
[IntrReadMem, NoCapture<0>],
[IntrReadMem, IntrArgMemOnly, NoCapture<0>],
"llvm.nvvm.ldg.global.i">;
def int_nvvm_ldg_global_f : Intrinsic<[llvm_anyfloat_ty],
[LLVMAnyPointerType<LLVMMatchType<0>>, llvm_i32_ty],
[IntrReadMem, NoCapture<0>],
[IntrReadMem, IntrArgMemOnly, NoCapture<0>],
"llvm.nvvm.ldg.global.f">;
def int_nvvm_ldg_global_p : Intrinsic<[llvm_anyptr_ty],
[LLVMAnyPointerType<LLVMMatchType<0>>, llvm_i32_ty],
[IntrReadMem, NoCapture<0>],
[IntrReadMem, IntrArgMemOnly, NoCapture<0>],
"llvm.nvvm.ldg.global.p">;

// Use for generic pointers
Expand Down

0 comments on commit ca3802b

Please sign in to comment.