summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/FunctionAttrs/nocapture.ll
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-07-19 18:50:26 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-07-19 18:50:26 +0000
commit5246e0b2c25c293e6896e3a6fff63ade00fcb54e (patch)
treecf68f8163eb170188b6c4bdba0011716ebcae5eb /llvm/test/Transforms/FunctionAttrs/nocapture.ll
parent63266b6be54c538037dad1f3a4e4f6b6c3cd1744 (diff)
downloadbcm5719-llvm-5246e0b2c25c293e6896e3a6fff63ade00fcb54e.tar.gz
bcm5719-llvm-5246e0b2c25c293e6896e3a6fff63ade00fcb54e.zip
[FunctionAttrs] Correct the safety analysis for inference of 'returned'
We skipped over ReturnInsts which didn't return an argument which would lead us to incorrectly conclude that an argument returned by another ReturnInst was 'returned'. This reverts commit r275756. This fixes PR28610. llvm-svn: 276008
Diffstat (limited to 'llvm/test/Transforms/FunctionAttrs/nocapture.ll')
-rw-r--r--llvm/test/Transforms/FunctionAttrs/nocapture.ll6
1 files changed, 3 insertions, 3 deletions
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
OpenPOWER on IntegriCloud