summaryrefslogtreecommitdiffstats
path: root/test/Verifier
diff options
context:
space:
mode:
authorNicolai Haehnle <nhaehnle@gmail.com>2016-07-04 08:01:29 +0000
committerNicolai Haehnle <nhaehnle@gmail.com>2016-07-04 08:01:29 +0000
commitb07f5404567484379450db2135cdc56ba08ebb00 (patch)
tree85ada6277883420d7c9b8aa5b9fce14cd59359cd /test/Verifier
parent061feda889306e89211087d63c4ebf4ef91a8446 (diff)
Add writeonly IR attribute
Summary: This complements the earlier addition of IntrWriteMem and IntrWriteArgMem LLVM intrinsic properties, see D18291. Also start using the attribute for memset, memcpy, and memmove intrinsics, and remove their special-casing in BasicAliasAnalysis. Reviewers: reames, joker.eph Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D18714 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274485 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Verifier')
-rw-r--r--test/Verifier/writeonly.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Verifier/writeonly.ll b/test/Verifier/writeonly.ll
new file mode 100644
index 000000000000..0eeaebbc3a88
--- /dev/null
+++ b/test/Verifier/writeonly.ll
@@ -0,0 +1,13 @@
+; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
+
+declare void @a() readnone writeonly
+; CHECK: Attributes {{.*}} are incompatible
+
+declare void @b() readonly writeonly
+; CHECK: Attributes {{.*}} are incompatible
+
+declare void @c(i32* readnone writeonly %p)
+; CHECK: Attributes {{.*}} are incompatible
+
+declare void @d(i32* readonly writeonly %p)
+; CHECK: Attributes {{.*}} are incompatible