1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/Feature/intrinsic-noduplicate.ll
Eli Bendersky ee591c4154 Expose "noduplicate" attribute as a property for intrinsics.
The "noduplicate" function attribute exists to prevent certain optimizations
from duplicating calls to the function. This is important on platforms where
certain function call duplications are unsafe (for example execution barriers
for CUDA and OpenCL).

This patch makes it possible to specify intrinsics as "noduplicate" and
translates that to the appropriate function attribute.

llvm-svn: 204200
2014-03-18 23:51:07 +00:00

10 lines
311 B
LLVM

; RUN: llvm-as < %s | llvm-dis | FileCheck %s
; Make sure LLVM knows about the noduplicate attribute on the
; llvm.cuda.syncthreads intrinsic.
declare void @llvm.cuda.syncthreads()
; CHECK: declare void @llvm.cuda.syncthreads() #[[ATTRNUM:[0-9]+]]
; CHECK: attributes #[[ATTRNUM]] = { noduplicate nounwind }