summaryrefslogtreecommitdiffstats
path: root/llvm/test/Analysis/GlobalsModRef/purecse.ll
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-04-24 10:45:44 +0000
committerBill Wendling <isanbard@gmail.com>2012-04-24 10:45:44 +0000
commit1981c0e533ef60e9b3eb02c87b20db7cae7f6352 (patch)
tree0a4bbb665b67c4df1a4577bf455e262ae90ff938 /llvm/test/Analysis/GlobalsModRef/purecse.ll
parent4cf911c0cdd97ffd9eed8e6d8a269cb4c075a922 (diff)
downloadbcm5719-llvm-1981c0e533ef60e9b3eb02c87b20db7cae7f6352.tar.gz
bcm5719-llvm-1981c0e533ef60e9b3eb02c87b20db7cae7f6352.zip
FileCheck-ize tests.
llvm-svn: 155434
Diffstat (limited to 'llvm/test/Analysis/GlobalsModRef/purecse.ll')
-rw-r--r--llvm/test/Analysis/GlobalsModRef/purecse.ll8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/test/Analysis/GlobalsModRef/purecse.ll b/llvm/test/Analysis/GlobalsModRef/purecse.ll
index 994aff8d4c6..e030417f955 100644
--- a/llvm/test/Analysis/GlobalsModRef/purecse.ll
+++ b/llvm/test/Analysis/GlobalsModRef/purecse.ll
@@ -1,6 +1,5 @@
; Test that pure functions are cse'd away
-; RUN: opt < %s -globalsmodref-aa -gvn -instcombine | \
-; RUN: llvm-dis | not grep sub
+; RUN: opt < %s -globalsmodref-aa -gvn -instcombine -S | FileCheck %s
define i32 @pure(i32 %X) {
%Y = add i32 %X, 1 ; <i32> [#uses=1]
@@ -8,6 +7,8 @@ define i32 @pure(i32 %X) {
}
define i32 @test1(i32 %X) {
+; CHECK: %A = call i32 @pure(i32 %X)
+; CHECK-NEXT: ret i32 0
%A = call i32 @pure( i32 %X ) ; <i32> [#uses=1]
%B = call i32 @pure( i32 %X ) ; <i32> [#uses=1]
%C = sub i32 %A, %B ; <i32> [#uses=1]
@@ -15,6 +16,9 @@ define i32 @test1(i32 %X) {
}
define i32 @test2(i32 %X, i32* %P) {
+; CHECK: %A = call i32 @pure(i32 %X)
+; CHECK-NEXT: store i32 %X, i32* %P
+; CHECK-NEXT: ret i32 0
%A = call i32 @pure( i32 %X ) ; <i32> [#uses=1]
store i32 %X, i32* %P ;; Does not invalidate 'pure' call.
%B = call i32 @pure( i32 %X ) ; <i32> [#uses=1]
OpenPOWER on IntegriCloud