[llvm] r268207 - [GlobalDCE] Modernize. Use FileCheck instead of grep.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Sun May 1 15:51:15 PDT 2016


Author: davide
Date: Sun May  1 17:51:14 2016
New Revision: 268207

URL: http://llvm.org/viewvc/llvm-project?rev=268207&view=rev
Log:
[GlobalDCE] Modernize. Use FileCheck instead of grep.

Modified:
    llvm/trunk/test/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll
    llvm/trunk/test/Transforms/GlobalDCE/2002-08-17-WorkListTest.ll
    llvm/trunk/test/Transforms/GlobalDCE/2003-07-01-SelfReference.ll
    llvm/trunk/test/Transforms/GlobalDCE/2003-10-09-PreserveWeakGlobals.ll
    llvm/trunk/test/Transforms/GlobalDCE/basicvariabletest.ll
    llvm/trunk/test/Transforms/GlobalDCE/externally_available.ll

Modified: llvm/trunk/test/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll?rev=268207&r1=268206&r2=268207&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll (original)
+++ llvm/trunk/test/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll Sun May  1 17:51:14 2016
@@ -1,8 +1,9 @@
 ; Make sure that functions are removed successfully if they are referred to by
 ; a global that is dead.  Make sure any globals they refer to die as well.
 
-; RUN: opt < %s -globaldce -S | not grep foo
+; RUN: opt < %s -globaldce -S | FileCheck %s
 
+; CHECK-NOT: foo
 ;; Unused, kills %foo
 @b = internal global i32 ()* @foo               ; <i32 ()**> [#uses=0]
 

Modified: llvm/trunk/test/Transforms/GlobalDCE/2002-08-17-WorkListTest.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalDCE/2002-08-17-WorkListTest.ll?rev=268207&r1=268206&r2=268207&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalDCE/2002-08-17-WorkListTest.ll (original)
+++ llvm/trunk/test/Transforms/GlobalDCE/2002-08-17-WorkListTest.ll Sun May  1 17:51:14 2016
@@ -1,7 +1,9 @@
 ; This testcase tests that a worklist is being used, and that globals can be 
 ; removed if they are the subject of a constexpr and ConstantPointerRef
 
-; RUN: opt < %s -globaldce -S | not grep global
+; RUN: opt < %s -globaldce -S | FileCheck %s
+
+; CHECK-NOT: global
 
 @t0 = internal global [4 x i8] c"foo\00"                ; <[4 x i8]*> [#uses=1]
 @t1 = internal global [4 x i8] c"bar\00"                ; <[4 x i8]*> [#uses=1]

Modified: llvm/trunk/test/Transforms/GlobalDCE/2003-07-01-SelfReference.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalDCE/2003-07-01-SelfReference.ll?rev=268207&r1=268206&r2=268207&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalDCE/2003-07-01-SelfReference.ll (original)
+++ llvm/trunk/test/Transforms/GlobalDCE/2003-07-01-SelfReference.ll Sun May  1 17:51:14 2016
@@ -1,5 +1,7 @@
 ; distilled from 255.vortex
-; RUN: opt < %s -globaldce -S | not grep testfunc
+; RUN: opt < %s -globaldce -S | FileCheck %s
+
+; CHECK-NOT: testfunc
 
 declare i1 ()* @getfunc()
 

Modified: llvm/trunk/test/Transforms/GlobalDCE/2003-10-09-PreserveWeakGlobals.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalDCE/2003-10-09-PreserveWeakGlobals.ll?rev=268207&r1=268206&r2=268207&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalDCE/2003-10-09-PreserveWeakGlobals.ll (original)
+++ llvm/trunk/test/Transforms/GlobalDCE/2003-10-09-PreserveWeakGlobals.ll Sun May  1 17:51:14 2016
@@ -1,6 +1,6 @@
 ; Weak variables should be preserved by global DCE!
 
-; RUN: opt < %s -globaldce -S | grep @A
-
+; RUN: opt < %s -globaldce -S | FileCheck %s
 
+; CHECK: @A
 @A = weak global i32 54

Modified: llvm/trunk/test/Transforms/GlobalDCE/basicvariabletest.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalDCE/basicvariabletest.ll?rev=268207&r1=268206&r2=268207&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalDCE/basicvariabletest.ll (original)
+++ llvm/trunk/test/Transforms/GlobalDCE/basicvariabletest.ll Sun May  1 17:51:14 2016
@@ -1,5 +1,6 @@
-; RUN: opt < %s -globaldce -S | not grep global
+; RUN: opt < %s -globaldce -S | FileCheck %s
 
+; CHECK-NOT: global
 @X = external global i32
 @Y = internal global i32 7
 

Modified: llvm/trunk/test/Transforms/GlobalDCE/externally_available.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalDCE/externally_available.ll?rev=268207&r1=268206&r2=268207&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GlobalDCE/externally_available.ll (original)
+++ llvm/trunk/test/Transforms/GlobalDCE/externally_available.ll Sun May  1 17:51:14 2016
@@ -1,10 +1,12 @@
-; RUN: opt < %s -globaldce -S | not grep test_
+; RUN: opt < %s -globaldce -S | FileCheck %s
 
 ; test_function should not be emitted to the .s file.
+; CHECK-NOT: test_function
 define available_externally i32 @test_function() {
   ret i32 4
 }
 
 ; test_global should not be emitted to the .s file.
+; CHECK-NOT: test_global
 @test_global = available_externally global i32 4
 




More information about the llvm-commits mailing list