[llvm] r267493 - GlobalOpt: Convert a bunch of tests from grep to FileCheck

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 16:36:51 PDT 2016


Author: bogner
Date: Mon Apr 25 18:36:50 2016
New Revision: 267493

URL: http://llvm.org/viewvc/llvm-project?rev=267493&view=rev
Log:
GlobalOpt: Convert a bunch of tests from grep to FileCheck

Modified:
    llvm/trunk/test/Transforms/GlobalOpt/2008-01-13-OutOfRangeSROA.ll
    llvm/trunk/test/Transforms/GlobalOpt/2008-01-29-VolatileGlobal.ll
    llvm/trunk/test/Transforms/GlobalOpt/2008-04-26-SROA-Global-Align.ll
    llvm/trunk/test/Transforms/GlobalOpt/2008-07-17-addrspace.ll
    llvm/trunk/test/Transforms/GlobalOpt/2009-01-13-phi-user.ll
    llvm/trunk/test/Transforms/GlobalOpt/2009-03-05-dbg.ll
    llvm/trunk/test/Transforms/GlobalOpt/2009-03-07-PromotePtrToBool.ll
    llvm/trunk/test/Transforms/GlobalOpt/basictest.ll
    llvm/trunk/test/Transforms/GlobalOpt/constantexpr-dangle.ll
    llvm/trunk/test/Transforms/GlobalOpt/deadglobal-2.ll
    llvm/trunk/test/Transforms/GlobalOpt/globalsra-partial.ll
    llvm/trunk/test/Transforms/GlobalOpt/globalsra-unknown-index.ll
    llvm/trunk/test/Transforms/GlobalOpt/globalsra.ll
    llvm/trunk/test/Transforms/GlobalOpt/heap-sra-phi.ll
    llvm/trunk/test/Transforms/GlobalOpt/iterate.ll
    llvm/trunk/test/Transforms/GlobalOpt/memcpy.ll
    llvm/trunk/test/Transforms/GlobalOpt/phi-select.ll
    llvm/trunk/test/Transforms/GlobalOpt/storepointer-compare.ll
    llvm/trunk/test/Transforms/GlobalOpt/storepointer.ll
    llvm/trunk/test/Transforms/GlobalOpt/trivialstore.ll
    llvm/trunk/test/Transforms/GlobalOpt/undef-init.ll

Modified: llvm/trunk/test/Transforms/GlobalOpt/2008-01-13-OutOfRangeSROA.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/2008-01-13-OutOfRangeSROA.ll?rev=267493&r1=267492&r2=267493&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalOpt/2008-01-13-OutOfRangeSROA.ll (original)
+++ llvm/trunk/test/Transforms/GlobalOpt/2008-01-13-OutOfRangeSROA.ll Mon Apr 25 18:36:50 2016
@@ -1,6 +1,8 @@
-; RUN: opt < %s -globalopt -S | grep "16 x .31 x double.. zeroinitializer"
+; RUN: opt < %s -globalopt -S | FileCheck %s
 
-; The 'X' indices could be larger than 31.  Do not SROA the outer indices of this array.
+; The 'X' indices could be larger than 31.  Do not SROA the outer
+; indices of this array.
+; CHECK: @mm = {{.*}} [16 x [31 x double]] zeroinitializer
 @mm = internal global [16 x [31 x double]] zeroinitializer, align 32
 
 define void @test(i32 %X) {

Modified: llvm/trunk/test/Transforms/GlobalOpt/2008-01-29-VolatileGlobal.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/2008-01-29-VolatileGlobal.ll?rev=267493&r1=267492&r2=267493&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalOpt/2008-01-29-VolatileGlobal.ll (original)
+++ llvm/trunk/test/Transforms/GlobalOpt/2008-01-29-VolatileGlobal.ll Mon Apr 25 18:36:50 2016
@@ -1,4 +1,5 @@
-; RUN: opt < %s -globalopt -S | grep "load volatile"
+; RUN: opt < %s -globalopt -S | FileCheck %s
+; CHECK: load volatile
 @t0.1441 = internal global double 0x3FD5555555555555, align 8		; <double*> [#uses=1]
 
 define double @foo() nounwind  {

Modified: llvm/trunk/test/Transforms/GlobalOpt/2008-04-26-SROA-Global-Align.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/2008-04-26-SROA-Global-Align.ll?rev=267493&r1=267492&r2=267493&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalOpt/2008-04-26-SROA-Global-Align.ll (original)
+++ llvm/trunk/test/Transforms/GlobalOpt/2008-04-26-SROA-Global-Align.ll Mon Apr 25 18:36:50 2016
@@ -2,9 +2,11 @@
 ; alignments.  Elements 0 and 2 must be 16-byte aligned, and element 
 ; 1 must be at least 8 byte aligned (but could be more). 
 
-; RUN: opt < %s -globalopt -S | grep "@G.0 = internal unnamed_addr global .*align 16"
-; RUN: opt < %s -globalopt -S | grep "@G.1 = internal unnamed_addr global .*align 8"
-; RUN: opt < %s -globalopt -S | grep "@G.2 = internal unnamed_addr global .*align 16"
+; RUN: opt < %s -globalopt -S | FileCheck %s
+; CHECK: @G.0 = internal unnamed_addr global {{.*}}align 16
+; CHECK: @G.1 = internal unnamed_addr global {{.*}}align 8
+; CHECK: @G.2 = internal unnamed_addr global {{.*}}align 16
+
 ; rdar://5891920
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"

Modified: llvm/trunk/test/Transforms/GlobalOpt/2008-07-17-addrspace.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/2008-07-17-addrspace.ll?rev=267493&r1=267492&r2=267493&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalOpt/2008-07-17-addrspace.ll (original)
+++ llvm/trunk/test/Transforms/GlobalOpt/2008-07-17-addrspace.ll Mon Apr 25 18:36:50 2016
@@ -2,9 +2,11 @@
 ; values. This used to crash, because globalopt forgot to put the new var in the
 ; same address space as the old one.
 
-; RUN: opt < %s -globalopt -S > %t
+; RUN: opt < %s -globalopt -S | FileCheck %s
+
 ; Check that the new global values still have their address space
-; RUN: cat %t | grep 'addrspace.*global'
+; CHECK: addrspace(1) global
+; CHECK: addrspace(1) global
 
 @struct = internal addrspace(1) global { i32, i32 } zeroinitializer
 @array = internal addrspace(1) global [ 2 x i32 ] zeroinitializer 
@@ -24,5 +26,3 @@ define void @bar(i32 %R) {
   store i32 %R, i32 addrspace(1) * getelementptr ({ i32, i32 }, { i32, i32 } addrspace(1) * @struct, i32 0, i32 0)
   ret void
 }
-
-

Modified: llvm/trunk/test/Transforms/GlobalOpt/2009-01-13-phi-user.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/2009-01-13-phi-user.ll?rev=267493&r1=267492&r2=267493&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalOpt/2009-01-13-phi-user.ll (original)
+++ llvm/trunk/test/Transforms/GlobalOpt/2009-01-13-phi-user.ll Mon Apr 25 18:36:50 2016
@@ -1,4 +1,5 @@
-; RUN: opt < %s -globalopt -S | grep "phi.*@head"
+; RUN: opt < %s -globalopt -S | FileCheck %s
+; CHECK: phi{{.*}}@head
 ; PR3321
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
 target triple = "x86_64-unknown-linux-gnu"

Modified: llvm/trunk/test/Transforms/GlobalOpt/2009-03-05-dbg.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/2009-03-05-dbg.ll?rev=267493&r1=267492&r2=267493&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalOpt/2009-03-05-dbg.ll (original)
+++ llvm/trunk/test/Transforms/GlobalOpt/2009-03-05-dbg.ll Mon Apr 25 18:36:50 2016
@@ -1,5 +1,6 @@
 ; REQUIRES: asserts
-; RUN: opt < %s -globalopt -stats -disable-output 2>&1 | grep "1 globalopt - Number of global vars shrunk to booleans"
+; RUN: opt < %s -globalopt -stats -disable-output 2>&1 | FileCheck %s
+; CHECK: 1 globalopt - Number of global vars shrunk to booleans
 
 @Stop = internal global i32 0                     ; <i32*> [#uses=3]
 

Modified: llvm/trunk/test/Transforms/GlobalOpt/2009-03-07-PromotePtrToBool.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/2009-03-07-PromotePtrToBool.ll?rev=267493&r1=267492&r2=267493&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalOpt/2009-03-07-PromotePtrToBool.ll (original)
+++ llvm/trunk/test/Transforms/GlobalOpt/2009-03-07-PromotePtrToBool.ll Mon Apr 25 18:36:50 2016
@@ -1,6 +1,8 @@
-; RUN: opt < %s -globalopt -S | grep "@X = internal unnamed_addr global i32"
+; RUN: opt < %s -globalopt -S | FileCheck %s
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
 target triple = "i386-apple-darwin7"
+
+; CHECK: @X = internal unnamed_addr global i32
 @X = internal global i32* null		; <i32**> [#uses=2]
 @Y = internal global i32 0		; <i32*> [#uses=1]
 

Modified: llvm/trunk/test/Transforms/GlobalOpt/basictest.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/basictest.ll?rev=267493&r1=267492&r2=267493&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalOpt/basictest.ll (original)
+++ llvm/trunk/test/Transforms/GlobalOpt/basictest.ll Mon Apr 25 18:36:50 2016
@@ -1,9 +1,9 @@
-; RUN: opt < %s -globalopt -S | not grep global
+; RUN: opt < %s -globalopt -S | FileCheck %s
 
+; CHECK-NOT: global
 @X = internal global i32 4              ; <i32*> [#uses=1]
 
 define i32 @foo() {
         %V = load i32, i32* @X               ; <i32> [#uses=1]
         ret i32 %V
 }
-

Modified: llvm/trunk/test/Transforms/GlobalOpt/constantexpr-dangle.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/constantexpr-dangle.ll?rev=267493&r1=267492&r2=267493&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalOpt/constantexpr-dangle.ll (original)
+++ llvm/trunk/test/Transforms/GlobalOpt/constantexpr-dangle.ll Mon Apr 25 18:36:50 2016
@@ -1,5 +1,5 @@
-; RUN: opt < %s -instcombine -globalopt -S | \
-; RUN:   grep "internal fastcc float @foo"
+; RUN: opt < %s -instcombine -globalopt -S | FileCheck %s
+; CHECK: internal fastcc float @foo
 
 define internal float @foo() {
         ret float 0.000000e+00
@@ -10,4 +10,3 @@ define float @bar() {
         %tmp2 = fmul float %tmp1, 1.000000e+01           ; <float> [#uses=1]
         ret float %tmp2
 }
-

Modified: llvm/trunk/test/Transforms/GlobalOpt/deadglobal-2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/deadglobal-2.ll?rev=267493&r1=267492&r2=267493&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalOpt/deadglobal-2.ll (original)
+++ llvm/trunk/test/Transforms/GlobalOpt/deadglobal-2.ll Mon Apr 25 18:36:50 2016
@@ -1,7 +1,7 @@
-; RUN: opt < %s -globalopt -S | not grep internal
-
+; RUN: opt < %s -globalopt -S | FileCheck %s
 ; This is a harder case to delete as the GEP has a variable index.
 
+; CHECK-NOT: internal
 @G = internal global [4 x i32] zeroinitializer
 
 define void @foo(i32 %X) {

Modified: llvm/trunk/test/Transforms/GlobalOpt/globalsra-partial.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/globalsra-partial.ll?rev=267493&r1=267492&r2=267493&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalOpt/globalsra-partial.ll (original)
+++ llvm/trunk/test/Transforms/GlobalOpt/globalsra-partial.ll Mon Apr 25 18:36:50 2016
@@ -1,10 +1,11 @@
 ; In this case, the global can only be broken up by one level.
 
-; RUN: opt < %s -globalopt -S | not grep 12345
+; RUN: opt < %s -globalopt -S | FileCheck %s
 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
 
 @G = internal global { i32, [4 x float] } zeroinitializer               ; <{ i32, [4 x float] }*> [#uses=3]
 
+; CHECK-NOT: 12345
 define void @onlystore() {
         store i32 12345, i32* getelementptr ({ i32, [4 x float] }, { i32, [4 x float] }* @G, i32 0, i32 0)
         ret void
@@ -21,4 +22,3 @@ define float @readval(i32 %i) {
         %V = load float, float* %Ptr           ; <float> [#uses=1]
         ret float %V
 }
-

Modified: llvm/trunk/test/Transforms/GlobalOpt/globalsra-unknown-index.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/globalsra-unknown-index.ll?rev=267493&r1=267492&r2=267493&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalOpt/globalsra-unknown-index.ll (original)
+++ llvm/trunk/test/Transforms/GlobalOpt/globalsra-unknown-index.ll Mon Apr 25 18:36:50 2016
@@ -1,12 +1,10 @@
-; RUN: opt < %s -globalopt -S > %t
-; RUN: grep "@Y = internal unnamed_addr global \[3 x [%]struct.X\] zeroinitializer" %t
-; RUN: grep load %t | count 6
-; RUN: grep "add i32 [%]a, [%]b" %t | count 3
+; RUN: opt < %s -globalopt -S | FileCheck %s
 
 ; globalopt should not sra the global, because it can't see the index.
 
 %struct.X = type { [3 x i32], [3 x i32] }
 
+; CHECK: @Y = internal unnamed_addr global [3 x %struct.X] zeroinitializer
 @Y = internal global [3 x %struct.X] zeroinitializer
 
 @addr = external global i8
@@ -15,6 +13,11 @@ define void @frob() {
   store i32 1, i32* getelementptr inbounds ([3 x %struct.X], [3 x %struct.X]* @Y, i64 0, i64 0, i32 0, i64 ptrtoint (i8* @addr to i64)), align 4
   ret void
 }
+
+; CHECK-LABEL: @borf
+; CHECK: %a = load
+; CHECK: %b = load
+; CHECK: add i32 %a, %b
 define i32 @borf(i64 %i, i64 %j) {
   %p = getelementptr inbounds [3 x %struct.X], [3 x %struct.X]* @Y, i64 0, i64 0, i32 0, i64 0
   %a = load i32, i32* %p
@@ -23,6 +26,11 @@ define i32 @borf(i64 %i, i64 %j) {
   %c = add i32 %a, %b
   ret i32 %c
 }
+
+; CHECK-LABEL: @borg
+; CHECK: %a = load
+; CHECK: %b = load
+; CHECK: add i32 %a, %b
 define i32 @borg(i64 %i, i64 %j) {
   %p = getelementptr inbounds [3 x %struct.X], [3 x %struct.X]* @Y, i64 0, i64 1, i32 0, i64 1
   %a = load i32, i32* %p
@@ -31,6 +39,11 @@ define i32 @borg(i64 %i, i64 %j) {
   %c = add i32 %a, %b
   ret i32 %c
 }
+
+; CHECK-LABEL: @borh
+; CHECK: %a = load
+; CHECK: %b = load
+; CHECK: add i32 %a, %b
 define i32 @borh(i64 %i, i64 %j) {
   %p = getelementptr inbounds [3 x %struct.X], [3 x %struct.X]* @Y, i64 0, i64 2, i32 0, i64 2
   %a = load i32, i32* %p

Modified: llvm/trunk/test/Transforms/GlobalOpt/globalsra.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/globalsra.ll?rev=267493&r1=267492&r2=267493&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalOpt/globalsra.ll (original)
+++ llvm/trunk/test/Transforms/GlobalOpt/globalsra.ll Mon Apr 25 18:36:50 2016
@@ -1,4 +1,5 @@
-; RUN: opt < %s -globalopt -S | not grep global
+; RUN: opt < %s -globalopt -S | FileCheck %s
+; CHECK-NOT: global
 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
 
 @G = internal global { i32, float, { double } } {
@@ -42,4 +43,3 @@ define double @constantize2() {
         %X = load double, double* getelementptr ({ i32, float, { double } }, { i32, float, { double } }* @G2, i32 0, i32 2, i32 0)           ; <double> [#uses=1]
         ret double %X
 }
-

Modified: llvm/trunk/test/Transforms/GlobalOpt/heap-sra-phi.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/heap-sra-phi.ll?rev=267493&r1=267492&r2=267493&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalOpt/heap-sra-phi.ll (original)
+++ llvm/trunk/test/Transforms/GlobalOpt/heap-sra-phi.ll Mon Apr 25 18:36:50 2016
@@ -1,5 +1,6 @@
-; RUN: opt < %s -globalopt -S | grep "tmp.f1 = phi i32. "
-; RUN: opt < %s -globalopt -S | grep "tmp.f0 = phi i32. "
+; RUN: opt < %s -globalopt -S | FileCheck %s
+; CHECK: tmp.f1 = phi i32*
+; CHECK: tmp.f0 = phi i32*
 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
 
 	%struct.foo = type { i32, i32 }

Modified: llvm/trunk/test/Transforms/GlobalOpt/iterate.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/iterate.ll?rev=267493&r1=267492&r2=267493&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalOpt/iterate.ll (original)
+++ llvm/trunk/test/Transforms/GlobalOpt/iterate.ll Mon Apr 25 18:36:50 2016
@@ -1,4 +1,5 @@
-; RUN: opt < %s -globalopt -S | not grep %G
+; RUN: opt < %s -globalopt -S | FileCheck %s
+; CHECK-NOT: %G
 
 @G = internal global i32 0              ; <i32*> [#uses=1]
 @H = internal global { i32* } { i32* @G }               ; <{ i32* }*> [#uses=1]
@@ -8,4 +9,3 @@ define i32 @loadg() {
         %GV = load i32, i32* %G              ; <i32> [#uses=1]
         ret i32 %GV
 }
-

Modified: llvm/trunk/test/Transforms/GlobalOpt/memcpy.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/memcpy.ll?rev=267493&r1=267492&r2=267493&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalOpt/memcpy.ll (original)
+++ llvm/trunk/test/Transforms/GlobalOpt/memcpy.ll Mon Apr 25 18:36:50 2016
@@ -1,5 +1,5 @@
-; RUN: opt < %s -globalopt -S | \
-; RUN:   grep "G1 = internal unnamed_addr constant"
+; RUN: opt < %s -globalopt -S | FileCheck %s
+; CHECK: G1 = internal unnamed_addr constant
 
 @G1 = internal global [58 x i8] c"asdlfkajsdlfkajsd;lfkajds;lfkjasd;flkajsd;lkfja;sdlkfjasd\00"         ; <[58 x i8]*> [#uses=1]
 

Modified: llvm/trunk/test/Transforms/GlobalOpt/phi-select.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/phi-select.ll?rev=267493&r1=267492&r2=267493&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalOpt/phi-select.ll (original)
+++ llvm/trunk/test/Transforms/GlobalOpt/phi-select.ll Mon Apr 25 18:36:50 2016
@@ -1,7 +1,8 @@
 ; Test that PHI nodes and select instructions do not necessarily make stuff
 ; non-constant.
 
-; RUN: opt < %s -globalopt -S | not grep global
+; RUN: opt < %s -globalopt -S | FileCheck %s
+; CHECK-NOT: global
 
 @X = internal global i32 4              ; <i32*> [#uses=2]
 @Y = internal global i32 5              ; <i32*> [#uses=2]
@@ -24,8 +25,3 @@ Cont:           ; preds = %T, %0
         %V = load i32, i32* %P               ; <i32> [#uses=1]
         ret i32 %V
 }
-
-
-
-
-

Modified: llvm/trunk/test/Transforms/GlobalOpt/storepointer-compare.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/storepointer-compare.ll?rev=267493&r1=267492&r2=267493&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalOpt/storepointer-compare.ll (original)
+++ llvm/trunk/test/Transforms/GlobalOpt/storepointer-compare.ll Mon Apr 25 18:36:50 2016
@@ -1,5 +1,5 @@
-; RUN: opt < %s -globalopt -S | \
-; RUN:   grep "call void @Actual"
+; RUN: opt < %s -globalopt -S | FileCheck %s
+; CHECK: call void @Actual
 
 ; Check that a comparison does not prevent an indirect call from being made 
 ; direct.  The global will still remain, but indirect call elim is still good.
@@ -27,4 +27,3 @@ DoCall:         ; preds = %0
 isNull:         ; preds = %0
         ret void
 }
-

Modified: llvm/trunk/test/Transforms/GlobalOpt/storepointer.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/storepointer.ll?rev=267493&r1=267492&r2=267493&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalOpt/storepointer.ll (original)
+++ llvm/trunk/test/Transforms/GlobalOpt/storepointer.ll Mon Apr 25 18:36:50 2016
@@ -1,4 +1,5 @@
-; RUN: opt < %s -globalopt -S | not grep global
+; RUN: opt < %s -globalopt -S | FileCheck %s
+; CHECK-NOT: global
 
 @G = internal global void ()* null              ; <void ()**> [#uses=2]
 
@@ -16,4 +17,3 @@ define void @doit() {
         call void %FP( )
         ret void
 }
-

Modified: llvm/trunk/test/Transforms/GlobalOpt/trivialstore.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/trivialstore.ll?rev=267493&r1=267492&r2=267493&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalOpt/trivialstore.ll (original)
+++ llvm/trunk/test/Transforms/GlobalOpt/trivialstore.ll Mon Apr 25 18:36:50 2016
@@ -1,4 +1,5 @@
-; RUN: opt < %s -globalopt -S | not grep G
+; RUN: opt < %s -globalopt -S | FileCheck %s
+; CHECK-NOT: G
 
 @G = internal global i32 17             ; <i32*> [#uses=3]
 
@@ -16,4 +17,3 @@ define internal void @dead() {
         store i32 123, i32* @G
         ret void
 }
-

Modified: llvm/trunk/test/Transforms/GlobalOpt/undef-init.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/undef-init.ll?rev=267493&r1=267492&r2=267493&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalOpt/undef-init.ll (original)
+++ llvm/trunk/test/Transforms/GlobalOpt/undef-init.ll Mon Apr 25 18:36:50 2016
@@ -1,4 +1,5 @@
-; RUN: opt < %s -globalopt -S | not grep store
+; RUN: opt < %s -globalopt -S | FileCheck %s
+; CHECK-NOT: store
 
 @llvm.global_ctors = appending global [1 x { i32, void ()* }] [ { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__Z3foov } ]          ; <[1 x { i32, void ()* }]*> [#uses=0]
 @X.0 = internal global i32 undef                ; <i32*> [#uses=2]
@@ -14,4 +15,3 @@ entry:
         store i32 1, i32* @X.0
         ret void
 }
-




More information about the llvm-commits mailing list