diff options
Diffstat (limited to 'llvm/test/Transforms/FunctionAttrs')
| -rw-r--r-- | llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadNone.ll | 6 | ||||
| -rw-r--r-- | llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadOnly.ll | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadNone.ll b/llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadNone.ll index 946453f586e..2e88a135a58 100644 --- a/llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadNone.ll +++ b/llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadNone.ll @@ -1,17 +1,21 @@ -; RUN: opt < %s -basicaa -functionattrs -S | grep readnone | count 4 +; RUN: opt < %s -basicaa -functionattrs -S | FileCheck %s @x = global i32 0 +; CHECK: declare i32 @e() readnone declare i32 @e() readnone +; CHECK: define i32 @f() readnone define i32 @f() { %tmp = call i32 @e( ) ; <i32> [#uses=1] ret i32 %tmp } +; CHECK: define i32 @g() readnone define i32 @g() readonly { ret i32 0 } +; CHECK: define i32 @h() readnone define i32 @h() readnone { %tmp = load i32* @x ; <i32> [#uses=1] ret i32 %tmp diff --git a/llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadOnly.ll b/llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadOnly.ll index 22eca132041..0b03fc87dd1 100644 --- a/llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadOnly.ll +++ b/llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadOnly.ll @@ -1,9 +1,11 @@ -; RUN: opt < %s -basicaa -functionattrs -S | grep readonly | count 2 +; RUN: opt < %s -basicaa -functionattrs -S | FileCheck %s +; CHECK: define i32 @f() readonly define i32 @f() { entry: - %tmp = call i32 @e( ) ; <i32> [#uses=1] - ret i32 %tmp + %tmp = call i32 @e( ) + ret i32 %tmp } +; CHECK: declare i32 @e() readonly declare i32 @e() readonly |

