llvm/test/CodeGen/NVPTX/isspacep.ll
Justin Holewinski de7bbdff33 [NVPTX] Add support for isspacep instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211931 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-27 18:35:24 +00:00

36 lines
896 B
LLVM

; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
declare i1 @llvm.nvvm.isspacep.const(i8*) readnone noinline
declare i1 @llvm.nvvm.isspacep.global(i8*) readnone noinline
declare i1 @llvm.nvvm.isspacep.local(i8*) readnone noinline
declare i1 @llvm.nvvm.isspacep.shared(i8*) readnone noinline
; CHECK: is_const
define i1 @is_const(i8* %addr) {
; CHECK: isspacep.const
%v = tail call i1 @llvm.nvvm.isspacep.const(i8* %addr)
ret i1 %v
}
; CHECK: is_global
define i1 @is_global(i8* %addr) {
; CHECK: isspacep.global
%v = tail call i1 @llvm.nvvm.isspacep.global(i8* %addr)
ret i1 %v
}
; CHECK: is_local
define i1 @is_local(i8* %addr) {
; CHECK: isspacep.local
%v = tail call i1 @llvm.nvvm.isspacep.local(i8* %addr)
ret i1 %v
}
; CHECK: is_shared
define i1 @is_shared(i8* %addr) {
; CHECK: isspacep.shared
%v = tail call i1 @llvm.nvvm.isspacep.shared(i8* %addr)
ret i1 %v
}