[llvm-commits] [llvm] r155434 - in /llvm/trunk/test/Analysis: Dominators/2006-10-02-BreakCritEdges.ll GlobalsModRef/2008-09-03-ReadGlobals.ll GlobalsModRef/aliastest.ll GlobalsModRef/chaining-analysis.ll GlobalsModRef/indirect-global.ll GlobalsModRef/modreftest.ll GlobalsModRef/purecse.ll
Bill Wendling
isanbard at gmail.com
Tue Apr 24 03:45:45 PDT 2012
Author: void
Date: Tue Apr 24 05:45:44 2012
New Revision: 155434
URL: http://llvm.org/viewvc/llvm-project?rev=155434&view=rev
Log:
FileCheck-ize tests.
Modified:
llvm/trunk/test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll
llvm/trunk/test/Analysis/GlobalsModRef/2008-09-03-ReadGlobals.ll
llvm/trunk/test/Analysis/GlobalsModRef/aliastest.ll
llvm/trunk/test/Analysis/GlobalsModRef/chaining-analysis.ll
llvm/trunk/test/Analysis/GlobalsModRef/indirect-global.ll
llvm/trunk/test/Analysis/GlobalsModRef/modreftest.ll
llvm/trunk/test/Analysis/GlobalsModRef/purecse.ll
Modified: llvm/trunk/test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll?rev=155434&r1=155433&r2=155434&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll (original)
+++ llvm/trunk/test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll Tue Apr 24 05:45:44 2012
@@ -1,7 +1,8 @@
-; RUN: opt < %s -domtree -break-crit-edges -analyze \
-; RUN: -domtree | grep {3.*%brtrue }
+; RUN: opt < %s -domtree -break-crit-edges -analyze -domtree | FileCheck %s
; PR932
+; CHECK: [3] %brtrue {1,2}
+
declare void @use1(i32)
define void @f(i32 %i, i1 %c) {
Modified: llvm/trunk/test/Analysis/GlobalsModRef/2008-09-03-ReadGlobals.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/GlobalsModRef/2008-09-03-ReadGlobals.ll?rev=155434&r1=155433&r2=155434&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/GlobalsModRef/2008-09-03-ReadGlobals.ll (original)
+++ llvm/trunk/test/Analysis/GlobalsModRef/2008-09-03-ReadGlobals.ll Tue Apr 24 05:45:44 2012
@@ -1,4 +1,4 @@
-; RUN: opt < %s -globalsmodref-aa -gvn -S | grep call | count 2
+; RUN: opt < %s -globalsmodref-aa -gvn -S | FileCheck %s
@g = internal global i32 0 ; <i32*> [#uses=2]
@@ -8,6 +8,8 @@
}
define i32 @f() {
+; CHECK: call i32 @e()
+; CHECK: call i32 @e()
entry:
%tmp = call i32 @e( ) ; <i32> [#uses=1]
store i32 %tmp, i32* @g
Modified: llvm/trunk/test/Analysis/GlobalsModRef/aliastest.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/GlobalsModRef/aliastest.ll?rev=155434&r1=155433&r2=155434&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/GlobalsModRef/aliastest.ll (original)
+++ llvm/trunk/test/Analysis/GlobalsModRef/aliastest.ll Tue Apr 24 05:45:44 2012
@@ -1,7 +1,12 @@
-; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -S | not grep load
+; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -S | FileCheck %s
+
@X = internal global i32 4 ; <i32*> [#uses=1]
define i32 @test(i32* %P) {
+; CHECK: @test
+; CHECK-NEXT: store i32 7, i32* %P
+; CHECK-NEXT: store i32 12, i32* @X
+; CHECK-NEXT: ret i32 7
store i32 7, i32* %P
store i32 12, i32* @X
%V = load i32* %P ; <i32> [#uses=1]
Modified: llvm/trunk/test/Analysis/GlobalsModRef/chaining-analysis.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/GlobalsModRef/chaining-analysis.ll?rev=155434&r1=155433&r2=155434&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/GlobalsModRef/chaining-analysis.ll (original)
+++ llvm/trunk/test/Analysis/GlobalsModRef/chaining-analysis.ll Tue Apr 24 05:45:44 2012
@@ -1,4 +1,4 @@
-; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -S | not grep load
+; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -S | FileCheck %s
; This test requires the use of previous analyses to determine that
; doesnotmodX does not modify X (because 'sin' doesn't).
@@ -8,6 +8,10 @@
declare double @sin(double) readnone
define i32 @test(i32* %P) {
+; CHECK: @test
+; CHECK-NEXT: store i32 12, i32* @X
+; CHECK-NEXT: call double @doesnotmodX(double 1.000000e+00)
+; CHECK-NEXT: ret i32 12
store i32 12, i32* @X
call double @doesnotmodX( double 1.000000e+00 ) ; <double>:1 [#uses=0]
%V = load i32* @X ; <i32> [#uses=1]
Modified: llvm/trunk/test/Analysis/GlobalsModRef/indirect-global.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/GlobalsModRef/indirect-global.ll?rev=155434&r1=155433&r2=155434&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/GlobalsModRef/indirect-global.ll (original)
+++ llvm/trunk/test/Analysis/GlobalsModRef/indirect-global.ll Tue Apr 24 05:45:44 2012
@@ -1,9 +1,7 @@
-; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -instcombine -S | \
-; RUN: grep {ret i32 0}
+; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -instcombine -S | FileCheck %s
@G = internal global i32* null ; <i32**> [#uses=3]
-
declare i8* @malloc(i32)
define void @test() {
%a = call i8* @malloc(i32 4)
@@ -13,6 +11,7 @@
}
define i32 @test1(i32* %P) {
+; CHECK: ret i32 0
%g1 = load i32** @G ; <i32*> [#uses=2]
%h1 = load i32* %g1 ; <i32> [#uses=1]
store i32 123, i32* %P
Modified: llvm/trunk/test/Analysis/GlobalsModRef/modreftest.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/GlobalsModRef/modreftest.ll?rev=155434&r1=155433&r2=155434&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/GlobalsModRef/modreftest.ll (original)
+++ llvm/trunk/test/Analysis/GlobalsModRef/modreftest.ll Tue Apr 24 05:45:44 2012
@@ -1,7 +1,12 @@
-; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -S | not grep load
+; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -S | FileCheck %s
+
@X = internal global i32 4 ; <i32*> [#uses=2]
define i32 @test(i32* %P) {
+; CHECK: @test
+; CHECK-NEXT: store i32 12, i32* @X
+; CHECK-NEXT: call void @doesnotmodX()
+; CHECK-NEXT: ret i32 12
store i32 12, i32* @X
call void @doesnotmodX( )
%V = load i32* @X ; <i32> [#uses=1]
Modified: llvm/trunk/test/Analysis/GlobalsModRef/purecse.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/GlobalsModRef/purecse.ll?rev=155434&r1=155433&r2=155434&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/GlobalsModRef/purecse.ll (original)
+++ llvm/trunk/test/Analysis/GlobalsModRef/purecse.ll Tue Apr 24 05:45:44 2012
@@ -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 @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 @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]
More information about the llvm-commits
mailing list