summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2016-05-01 22:51:14 +0000
committerDavide Italiano <davide@freebsd.org>2016-05-01 22:51:14 +0000
commit4f277763cf7daacb7f91478c04454da046c70545 (patch)
tree6e9e8ef15cfa0a03102c93530f44ac5e5dea40d3
parentca140b17cb9c2c093ea3e45441091be0bd9e51ac (diff)
downloadbcm5719-llvm-4f277763cf7daacb7f91478c04454da046c70545.tar.gz
bcm5719-llvm-4f277763cf7daacb7f91478c04454da046c70545.zip
[GlobalDCE] Modernize. Use FileCheck instead of grep.
llvm-svn: 268207
-rw-r--r--llvm/test/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll3
-rw-r--r--llvm/test/Transforms/GlobalDCE/2002-08-17-WorkListTest.ll4
-rw-r--r--llvm/test/Transforms/GlobalDCE/2003-07-01-SelfReference.ll4
-rw-r--r--llvm/test/Transforms/GlobalDCE/2003-10-09-PreserveWeakGlobals.ll4
-rw-r--r--llvm/test/Transforms/GlobalDCE/basicvariabletest.ll3
-rw-r--r--llvm/test/Transforms/GlobalDCE/externally_available.ll4
6 files changed, 15 insertions, 7 deletions
diff --git a/llvm/test/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll b/llvm/test/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll
index 49a87d90230..3da0fd5f14b 100644
--- a/llvm/test/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll
+++ b/llvm/test/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll
@@ -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]
diff --git a/llvm/test/Transforms/GlobalDCE/2002-08-17-WorkListTest.ll b/llvm/test/Transforms/GlobalDCE/2002-08-17-WorkListTest.ll
index 58d3f4c7d84..4e45e2bb468 100644
--- a/llvm/test/Transforms/GlobalDCE/2002-08-17-WorkListTest.ll
+++ b/llvm/test/Transforms/GlobalDCE/2002-08-17-WorkListTest.ll
@@ -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]
diff --git a/llvm/test/Transforms/GlobalDCE/2003-07-01-SelfReference.ll b/llvm/test/Transforms/GlobalDCE/2003-07-01-SelfReference.ll
index 781c57e4ad4..0b1b2792453 100644
--- a/llvm/test/Transforms/GlobalDCE/2003-07-01-SelfReference.ll
+++ b/llvm/test/Transforms/GlobalDCE/2003-07-01-SelfReference.ll
@@ -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()
diff --git a/llvm/test/Transforms/GlobalDCE/2003-10-09-PreserveWeakGlobals.ll b/llvm/test/Transforms/GlobalDCE/2003-10-09-PreserveWeakGlobals.ll
index 5b2c97f0f85..ded31659721 100644
--- a/llvm/test/Transforms/GlobalDCE/2003-10-09-PreserveWeakGlobals.ll
+++ b/llvm/test/Transforms/GlobalDCE/2003-10-09-PreserveWeakGlobals.ll
@@ -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
diff --git a/llvm/test/Transforms/GlobalDCE/basicvariabletest.ll b/llvm/test/Transforms/GlobalDCE/basicvariabletest.ll
index a97b66de2c6..af7d2feb694 100644
--- a/llvm/test/Transforms/GlobalDCE/basicvariabletest.ll
+++ b/llvm/test/Transforms/GlobalDCE/basicvariabletest.ll
@@ -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
diff --git a/llvm/test/Transforms/GlobalDCE/externally_available.ll b/llvm/test/Transforms/GlobalDCE/externally_available.ll
index cc88cb10dcc..fca49b29ec8 100644
--- a/llvm/test/Transforms/GlobalDCE/externally_available.ll
+++ b/llvm/test/Transforms/GlobalDCE/externally_available.ll
@@ -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
OpenPOWER on IntegriCloud