summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/FunctionAttrs
diff options
context:
space:
mode:
authorJames Molloy <james.molloy@arm.com>2015-11-12 09:05:43 +0000
committerJames Molloy <james.molloy@arm.com>2015-11-12 09:05:43 +0000
commit9a32da74f7d771baf6caed1b96fb6f19fa39d4d7 (patch)
tree4da2d7ac6dba2fb7db172a8fa4b5054646375488 /llvm/test/Transforms/FunctionAttrs
parentb14994e7525d20cb97ce9ebef18802cb038c5d66 (diff)
downloadbcm5719-llvm-9a32da74f7d771baf6caed1b96fb6f19fa39d4d7.tar.gz
bcm5719-llvm-9a32da74f7d771baf6caed1b96fb6f19fa39d4d7.zip
Revert "[FunctionAttrs] Identify norecurse functions"
This reverts commit r252862. This introduced test failures and I'm reverting while I investigate how this happened. llvm-svn: 252863
Diffstat (limited to 'llvm/test/Transforms/FunctionAttrs')
-rw-r--r--llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadNone.ll5
-rw-r--r--llvm/test/Transforms/FunctionAttrs/2010-10-30-volatile.ll4
-rw-r--r--llvm/test/Transforms/FunctionAttrs/atomic.ll4
-rw-r--r--llvm/test/Transforms/FunctionAttrs/norecurse.ll57
-rw-r--r--llvm/test/Transforms/FunctionAttrs/optnone.ll6
5 files changed, 7 insertions, 69 deletions
diff --git a/llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadNone.ll b/llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadNone.ll
index b62698a776f..ca05d63743b 100644
--- a/llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadNone.ll
+++ b/llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadNone.ll
@@ -10,16 +10,15 @@ define i32 @f() {
ret i32 %tmp
}
-; CHECK: define i32 @g() #1
+; CHECK: define i32 @g() #0
define i32 @g() readonly {
ret i32 0
}
-; CHECK: define i32 @h() #1
+; CHECK: define i32 @h() #0
define i32 @h() readnone {
%tmp = load i32, i32* @x ; <i32> [#uses=1]
ret i32 %tmp
}
; CHECK: attributes #0 = { readnone }
-; CHECK: attributes #1 = { norecurse readnone }
diff --git a/llvm/test/Transforms/FunctionAttrs/2010-10-30-volatile.ll b/llvm/test/Transforms/FunctionAttrs/2010-10-30-volatile.ll
index 23bb18e92b4..1a64a839380 100644
--- a/llvm/test/Transforms/FunctionAttrs/2010-10-30-volatile.ll
+++ b/llvm/test/Transforms/FunctionAttrs/2010-10-30-volatile.ll
@@ -4,9 +4,7 @@
@g = constant i32 1
define void @foo() {
-; CHECK: void @foo() #0 {
+; CHECK: void @foo() {
%tmp = load volatile i32, i32* @g
ret void
}
-
-; CHECK: attributes #0 = { norecurse }
diff --git a/llvm/test/Transforms/FunctionAttrs/atomic.ll b/llvm/test/Transforms/FunctionAttrs/atomic.ll
index dd915a6027f..bb867011cc2 100644
--- a/llvm/test/Transforms/FunctionAttrs/atomic.ll
+++ b/llvm/test/Transforms/FunctionAttrs/atomic.ll
@@ -19,5 +19,5 @@ entry:
ret i32 %r
}
-; CHECK: attributes #0 = { norecurse readnone ssp uwtable }
-; CHECK: attributes #1 = { norecurse ssp uwtable }
+; CHECK: attributes #0 = { readnone ssp uwtable }
+; CHECK: attributes #1 = { ssp uwtable }
diff --git a/llvm/test/Transforms/FunctionAttrs/norecurse.ll b/llvm/test/Transforms/FunctionAttrs/norecurse.ll
deleted file mode 100644
index 47481191d27..00000000000
--- a/llvm/test/Transforms/FunctionAttrs/norecurse.ll
+++ /dev/null
@@ -1,57 +0,0 @@
-; RUN: opt < %s -basicaa -functionattrs -S | FileCheck %s
-
-; CHECK: define i32 @leaf() #0
-define i32 @leaf() {
- ret i32 1
-}
-
-; CHECK: define i32 @self_rec() #1
-define i32 @self_rec() {
- %a = call i32 @self_rec()
- ret i32 4
-}
-
-; CHECK: define i32 @indirect_rec() #1
-define i32 @indirect_rec() {
- %a = call i32 @indirect_rec2()
- ret i32 %a
-}
-; CHECK: define i32 @indirect_rec2() #1
-define i32 @indirect_rec2() {
- %a = call i32 @indirect_rec()
- ret i32 %a
-}
-
-; CHECK: define i32 @extern() #1
-define i32 @extern() {
- %a = call i32 @k()
- ret i32 %a
-}
-declare i32 @k() readnone
-
-; CHECK: define internal i32 @called_by_norecurse() #0
-define internal i32 @called_by_norecurse() {
- %a = call i32 @k()
- ret i32 %a
-}
-define void @m() norecurse {
- %a = call i32 @called_by_norecurse()
- ret void
-}
-
-; CHECK: define internal i32 @called_by_norecurse_indirectly() #0
-define internal i32 @called_by_norecurse_indirectly() {
- %a = call i32 @k()
- ret i32 %a
-}
-define internal void @o() {
- %a = call i32 @called_by_norecurse_indirectly()
- ret void
-}
-define void @p() norecurse {
- call void @o()
- ret void
-}
-
-; CHECK: attributes #0 = { norecurse readnone }
-; CHECK: attributes #1 = { readnone }
diff --git a/llvm/test/Transforms/FunctionAttrs/optnone.ll b/llvm/test/Transforms/FunctionAttrs/optnone.ll
index 441ff4da65e..7694bfe13aa 100644
--- a/llvm/test/Transforms/FunctionAttrs/optnone.ll
+++ b/llvm/test/Transforms/FunctionAttrs/optnone.ll
@@ -16,11 +16,9 @@ define void @test_optnone(i8* %p) noinline optnone {
declare i8 @strlen(i8*) noinline optnone
; CHECK-LABEL: @strlen
-; CHECK: (i8*) #2
+; CHECK: (i8*) #1
; CHECK-LABEL: attributes #0
-; CHECK: = { norecurse readnone }
+; CHECK: = { readnone }
; CHECK-LABEL: attributes #1
-; CHECK: = { noinline norecurse optnone }
-; CHECK-LABEL: attributes #2
; CHECK: = { noinline optnone }
OpenPOWER on IntegriCloud