1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/test/CodeGen/NVPTX/isspacep.ll
Justin Holewinski 7c9cd5f566 [NVPTX] Add support for isspacep instruction
llvm-svn: 211931
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
}