summaryrefslogtreecommitdiffstats
path: root/llvm/test/Feature/intrinsic-noduplicate.ll
diff options
context:
space:
mode:
authorEli Bendersky <eliben@google.com>2014-03-18 23:51:07 +0000
committerEli Bendersky <eliben@google.com>2014-03-18 23:51:07 +0000
commit2281ef91e6e7da350777bc72c59af14b65ab413e (patch)
tree6150eb4a4e25ffa90e0e7d333398a2ad9f3616fe /llvm/test/Feature/intrinsic-noduplicate.ll
parentf078eff39c48f213903a572a2dc2dabd8c719adc (diff)
downloadbcm5719-llvm-2281ef91e6e7da350777bc72c59af14b65ab413e.tar.gz
bcm5719-llvm-2281ef91e6e7da350777bc72c59af14b65ab413e.zip
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
Diffstat (limited to 'llvm/test/Feature/intrinsic-noduplicate.ll')
-rw-r--r--llvm/test/Feature/intrinsic-noduplicate.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/Feature/intrinsic-noduplicate.ll b/llvm/test/Feature/intrinsic-noduplicate.ll
new file mode 100644
index 00000000000..9a2b0aba5bd
--- /dev/null
+++ b/llvm/test/Feature/intrinsic-noduplicate.ll
@@ -0,0 +1,9 @@
+; 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 }
OpenPOWER on IntegriCloud