mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
[GlobalDCE] Modernize. Use FileCheck instead of grep.
llvm-svn: 268207
This commit is contained in:
parent
b50a7dc851
commit
4d35211d79
@ -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]
|
||||
|
||||
|
@ -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]
|
||||
|
@ -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()
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user