summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/FunctionAttrs
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2016-07-16 07:21:28 +0000
committerHal Finkel <hfinkel@anl.gov>2016-07-16 07:21:28 +0000
commit660096b26045e2be00d5a7eb8df15ae3d45cc5c5 (patch)
tree6d60dc9e537fa1ad5b24d7209a9d7b7104317734 /llvm/test/Transforms/FunctionAttrs
parent04b5330ccdf93e3d051c7abe67303dd2dc973303 (diff)
downloadbcm5719-llvm-660096b26045e2be00d5a7eb8df15ae3d45cc5c5.tar.gz
bcm5719-llvm-660096b26045e2be00d5a7eb8df15ae3d45cc5c5.zip
Revert "Revert r275027 - Let FuncAttrs infer the 'returned' argument attribute"
This reverts commit r275042; the initial commit triggered self-hosting failures on ARM/AArch64. James Molloy identified the problematic backend code, which has been disabled in r275677. Trying again... Original commit message: Let FuncAttrs infer the 'returned' argument attribute A function can have one argument with the 'returned' attribute, indicating that the associated argument is always the return value of the function. Add FuncAttrs inference logic. llvm-svn: 275678
Diffstat (limited to 'llvm/test/Transforms/FunctionAttrs')
-rw-r--r--llvm/test/Transforms/FunctionAttrs/2009-01-02-LocalStores.ll2
-rw-r--r--llvm/test/Transforms/FunctionAttrs/nocapture.ll6
-rw-r--r--llvm/test/Transforms/FunctionAttrs/readattrs.ll4
3 files changed, 6 insertions, 6 deletions
diff --git a/llvm/test/Transforms/FunctionAttrs/2009-01-02-LocalStores.ll b/llvm/test/Transforms/FunctionAttrs/2009-01-02-LocalStores.ll
index ec1db095728..0d0231b42ae 100644
--- a/llvm/test/Transforms/FunctionAttrs/2009-01-02-LocalStores.ll
+++ b/llvm/test/Transforms/FunctionAttrs/2009-01-02-LocalStores.ll
@@ -14,7 +14,7 @@ define i32* @b(i32 *%q) {
ret i32* %tmp
}
-; CHECK: define i32* @c(i32* readnone %r)
+; CHECK: define i32* @c(i32* readnone returned %r)
@g = global i32 0
define i32* @c(i32 *%r) {
%a = icmp eq i32* %r, null
diff --git a/llvm/test/Transforms/FunctionAttrs/nocapture.ll b/llvm/test/Transforms/FunctionAttrs/nocapture.ll
index 020d8bcd4c7..e137a3800ce 100644
--- a/llvm/test/Transforms/FunctionAttrs/nocapture.ll
+++ b/llvm/test/Transforms/FunctionAttrs/nocapture.ll
@@ -1,7 +1,7 @@
; RUN: opt < %s -functionattrs -S | FileCheck %s
@g = global i32* null ; <i32**> [#uses=1]
-; CHECK: define i32* @c1(i32* readnone %q)
+; CHECK: define i32* @c1(i32* readnone returned %q)
define i32* @c1(i32* %q) {
ret i32* %q
}
@@ -140,7 +140,7 @@ define void @test1_1(i8* %x1_1, i8* %y1_1) {
ret void
}
-; CHECK: define i8* @test1_2(i8* nocapture readnone %x1_2, i8* %y1_2)
+; CHECK: define i8* @test1_2(i8* nocapture readnone %x1_2, i8* returned %y1_2)
define i8* @test1_2(i8* %x1_2, i8* %y1_2) {
call void @test1_1(i8* %x1_2, i8* %y1_2)
store i32* null, i32** @g
@@ -168,7 +168,7 @@ define void @test4_1(i8* %x4_1) {
ret void
}
-; CHECK: define i8* @test4_2(i8* nocapture readnone %x4_2, i8* readnone %y4_2, i8* nocapture readnone %z4_2)
+; CHECK: define i8* @test4_2(i8* nocapture readnone %x4_2, i8* readnone returned %y4_2, i8* nocapture readnone %z4_2)
define i8* @test4_2(i8* %x4_2, i8* %y4_2, i8* %z4_2) {
call void @test4_1(i8* null)
store i32* null, i32** @g
diff --git a/llvm/test/Transforms/FunctionAttrs/readattrs.ll b/llvm/test/Transforms/FunctionAttrs/readattrs.ll
index 65861a55fc2..988557e2715 100644
--- a/llvm/test/Transforms/FunctionAttrs/readattrs.ll
+++ b/llvm/test/Transforms/FunctionAttrs/readattrs.ll
@@ -11,7 +11,7 @@ define void @test1_2(i8* %x1_2, i8* %y1_2, i8* %z1_2) {
ret void
}
-; CHECK: define i8* @test2(i8* readnone %p)
+; CHECK: define i8* @test2(i8* readnone returned %p)
define i8* @test2(i8* %p) {
store i32 0, i32* @x
ret i8* %p
@@ -53,7 +53,7 @@ define void @test7_1(i32* inalloca %a) {
ret void
}
-; CHECK: define i32* @test8_1(i32* readnone %p)
+; CHECK: define i32* @test8_1(i32* readnone returned %p)
define i32* @test8_1(i32* %p) {
entry:
ret i32* %p
OpenPOWER on IntegriCloud