summaryrefslogtreecommitdiffstats
path: root/test/Bitcode
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/Bitcode
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/Bitcode')
-rw-r--r--test/Bitcode/attributes.ll11
-rw-r--r--test/Bitcode/compatibility.ll7
-rw-r--r--test/Bitcode/invalid.ll2
-rw-r--r--test/Bitcode/invalid.ll.bcbin688 -> 688 bytes
4 files changed, 15 insertions, 5 deletions
diff --git a/test/Bitcode/attributes.ll b/test/Bitcode/attributes.ll
index d230aa7aa4c1..9fdf54b7b308 100644
--- a/test/Bitcode/attributes.ll
+++ b/test/Bitcode/attributes.ll
@@ -204,7 +204,7 @@ define void @f34()
; CHECK: define void @f34()
{
call void @nobuiltin() nobuiltin
-; CHECK: call void @nobuiltin() #32
+; CHECK: call void @nobuiltin() #33
ret void;
}
@@ -328,6 +328,12 @@ define i8* @f55(i32, i32) allocsize(0, 1) {
ret i8* null
}
+; CHECK: define void @f56() #32
+define void @f56() writeonly
+{
+ ret void
+}
+
; CHECK: attributes #0 = { noreturn }
; CHECK: attributes #1 = { nounwind }
; CHECK: attributes #2 = { readnone }
@@ -360,4 +366,5 @@ define i8* @f55(i32, i32) allocsize(0, 1) {
; CHECK: attributes #29 = { inaccessiblemem_or_argmemonly }
; CHECK: attributes #30 = { allocsize(0) }
; CHECK: attributes #31 = { allocsize(0,1) }
-; CHECK: attributes #32 = { nobuiltin }
+; CHECK: attributes #32 = { writeonly }
+; CHECK: attributes #33 = { nobuiltin }
diff --git a/test/Bitcode/compatibility.ll b/test/Bitcode/compatibility.ll
index 827bc6a56caa..18270607c3cb 100644
--- a/test/Bitcode/compatibility.ll
+++ b/test/Bitcode/compatibility.ll
@@ -1244,7 +1244,7 @@ exit:
; CHECK: select <2 x i1> <i1 true, i1 false>, <2 x i8> <i8 2, i8 3>, <2 x i8> <i8 3, i8 2>
call void @f.nobuiltin() builtin
- ; CHECK: call void @f.nobuiltin() #39
+ ; CHECK: call void @f.nobuiltin() #40
call fastcc noalias i32* @f.noalias() noinline
; CHECK: call fastcc noalias i32* @f.noalias() #12
@@ -1590,6 +1590,8 @@ normal:
ret void
}
+declare void @f.writeonly() writeonly
+; CHECK: declare void @f.writeonly() #39
; CHECK: attributes #0 = { alignstack=4 }
; CHECK: attributes #1 = { alignstack=8 }
@@ -1630,7 +1632,8 @@ normal:
; CHECK: attributes #36 = { argmemonly nounwind readonly }
; CHECK: attributes #37 = { argmemonly nounwind }
; CHECK: attributes #38 = { nounwind readonly }
-; CHECK: attributes #39 = { builtin }
+; CHECK: attributes #39 = { writeonly }
+; CHECK: attributes #40 = { builtin }
;; Metadata
diff --git a/test/Bitcode/invalid.ll b/test/Bitcode/invalid.ll
index c56f0ffefa9e..4bbb4570f7e7 100644
--- a/test/Bitcode/invalid.ll
+++ b/test/Bitcode/invalid.ll
@@ -1,6 +1,6 @@
; RUN: not llvm-dis < %s.bc 2>&1 | FileCheck %s
-; CHECK: llvm-dis{{(\.EXE|\.exe)?}}: error: Unknown attribute kind (52)
+; CHECK: llvm-dis{{(\.EXE|\.exe)?}}: error: Unknown attribute kind (63)
; invalid.ll.bc has an invalid attribute number.
; The test checks that LLVM reports the error and doesn't access freed memory
diff --git a/test/Bitcode/invalid.ll.bc b/test/Bitcode/invalid.ll.bc
index 60c7afffbc23..a2b611e6c516 100644
--- a/test/Bitcode/invalid.ll.bc
+++ b/test/Bitcode/invalid.ll.bc
Binary files differ