summaryrefslogtreecommitdiffstats
path: root/llvm/test/Analysis/BasicAA/pure-const-dce.ll
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-04-24 09:15:38 +0000
committerBill Wendling <isanbard@gmail.com>2012-04-24 09:15:38 +0000
commitcd6df16cb4c6dd65d1b4b20b8b18a2378a584d52 (patch)
tree535f2dcf4228567688f8008bef1c5e9cd4d2de1b /llvm/test/Analysis/BasicAA/pure-const-dce.ll
parent582911a08931782ea6eb863ff2e43d6f8c236dbb (diff)
downloadbcm5719-llvm-cd6df16cb4c6dd65d1b4b20b8b18a2378a584d52.tar.gz
bcm5719-llvm-cd6df16cb4c6dd65d1b4b20b8b18a2378a584d52.zip
FileCheck-ize these tests. Harden some of them.
llvm-svn: 155432
Diffstat (limited to 'llvm/test/Analysis/BasicAA/pure-const-dce.ll')
-rw-r--r--llvm/test/Analysis/BasicAA/pure-const-dce.ll26
1 files changed, 22 insertions, 4 deletions
diff --git a/llvm/test/Analysis/BasicAA/pure-const-dce.ll b/llvm/test/Analysis/BasicAA/pure-const-dce.ll
index 54e6e79a5e5..266e607b21a 100644
--- a/llvm/test/Analysis/BasicAA/pure-const-dce.ll
+++ b/llvm/test/Analysis/BasicAA/pure-const-dce.ll
@@ -1,7 +1,25 @@
-; RUN: opt < %s -basicaa -gvn -S | grep TestConst | count 2
-; RUN: opt < %s -basicaa -gvn -S | grep TestPure | count 3
-; RUN: opt < %s -basicaa -gvn -S | grep TestNone | count 4
-@g = global i32 0 ; <i32*> [#uses=1]
+; RUN: opt < %s -basicaa -gvn -S | FileCheck %s
+
+@g = global i32 0
+
+; CHECK: @test
+; CHECK: entry
+; CHECK: %tmp0 = call i32 @TestConst(i32 5) readnone
+; CHECK-NEXT: %tmp1 = call i32 @TestPure(i32 6) readonly
+; CHECK-NEXT: %tmp2 = call i32 @TestNone(i32 7)
+; CHECK-NEXT: store i32 1, i32* @g
+; CHECK-NEXT: %tmp5 = call i32 @TestPure(i32 6) readonly
+; CHECK-NEXT: %tmp7 = call i32 @TestNone(i32 7)
+; CHECK-NEXT: %tmp8 = call i32 @TestNone(i32 7)
+; CHECK-NEXT: %sum0 = add i32 %tmp0, %tmp1
+; CHECK-NEXT: %sum1 = add i32 %sum0, %tmp2
+; CHECK-NEXT: %sum2 = add i32 %sum1, %tmp0
+; CHECK-NEXT: %sum3 = add i32 %sum2, %tmp0
+; CHECK-NEXT: %sum4 = add i32 %sum3, %tmp5
+; CHECK-NEXT: %sum5 = add i32 %sum4, %tmp5
+; CHECK-NEXT: %sum6 = add i32 %sum5, %tmp7
+; CHECK-NEXT: %sum7 = add i32 %sum6, %tmp8
+; CHECK-NEXT: ret i32 %sum7
define i32 @test() {
entry:
OpenPOWER on IntegriCloud