mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-25 12:49:50 +00:00
For PR1319:
Upgrade to use new Tcl exec based test harness. This exposes 3 bugs that were previously not being reported: test/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll test/Transforms/GlobalOpt/memset.ll test/Transforms/IndVarsSimplify/exit_value_tests.llx git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36065 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e9bbaa2293
commit
9aafdcf20d
@ -2,7 +2,8 @@
|
||||
; generated code should perform the appropriate masking operations required
|
||||
; depending on the endianness of the target...
|
||||
; XFAIL: *
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg | llvm-dis | not grep 'alloca'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg | llvm-dis | \
|
||||
; RUN: not grep alloca
|
||||
|
||||
implementation
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
load_lib llvm-dg.exp
|
||||
load_lib llvm.exp
|
||||
|
||||
llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
|
||||
RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
|
||||
|
@ -1,3 +1,3 @@
|
||||
load_lib llvm-dg.exp
|
||||
load_lib llvm.exp
|
||||
|
||||
llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
|
||||
RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
|
||||
|
@ -1,3 +1,3 @@
|
||||
load_lib llvm-dg.exp
|
||||
load_lib llvm.exp
|
||||
|
||||
llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
|
||||
RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -prune-eh | llvm-dis | not grep 'ret int'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -prune-eh | llvm-dis | \
|
||||
; RUN: not grep {ret i32}
|
||||
|
||||
void %noreturn() {
|
||||
unwind
|
||||
|
@ -1,3 +1,3 @@
|
||||
load_lib llvm-dg.exp
|
||||
load_lib llvm.exp
|
||||
|
||||
llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
|
||||
RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | grep 'ret i32 0'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis |\
|
||||
; RUN: grep {ret i32 0}
|
||||
|
||||
int %f(int %a0, int %a1, int %a2, int %a3, int %a4) {
|
||||
%tmp.2 = add int %a4, %a3 ; <int> [#uses=1]
|
||||
|
@ -1,3 +1,3 @@
|
||||
load_lib llvm-dg.exp
|
||||
load_lib llvm.exp
|
||||
|
||||
llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
|
||||
RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | not grep 'sub int 0'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis |\
|
||||
; RUN: not grep {sub i32 0}
|
||||
|
||||
int %test(int %X, int %Y, int %Z) {
|
||||
%A = sub int 0, %X
|
||||
|
@ -1,6 +1,7 @@
|
||||
; With shl->mul reassociation, we can see that this is (shl A, 9) * A
|
||||
;
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | grep 'shl .*, 9'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis |\
|
||||
; RUN: grep {shl .*, 9}
|
||||
|
||||
int %test(int %A, int %B) {
|
||||
%X = shl int %A, ubyte 5
|
||||
|
@ -2,7 +2,8 @@
|
||||
; this is in fact NOT the case, so the return should still be alive in the code
|
||||
; after sccp and CFG simplification have been performed.
|
||||
;
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -simplifycfg | llvm-dis | grep ret
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -simplifycfg | llvm-dis | \
|
||||
; RUN: grep ret
|
||||
|
||||
|
||||
void "old_main"() {
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | not grep '%X'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | not grep %X
|
||||
|
||||
%G = uninitialized global [40x int]
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -simplifycfg | llvm-dis | not grep then:
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -simplifycfg | llvm-dis | \
|
||||
; RUN: not grep then:
|
||||
|
||||
void %cprop_test11(int* %data.1) {
|
||||
entry: ; No predecessors!
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | grep 'ret i32 1'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | grep {ret i32 1}
|
||||
|
||||
; This function definitely returns 1, even if we don't know the direction
|
||||
; of the branch.
|
||||
|
@ -2,6 +2,7 @@
|
||||
; SCCP ignores VectorTypes until PR 1034 is fixed
|
||||
;
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -sccp
|
||||
; END.
|
||||
target datalayout = "E-p:32:32"
|
||||
target endian = big
|
||||
target pointersize = 32
|
||||
|
@ -1,5 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | \
|
||||
; RUN: grep 'ret i1 false'
|
||||
; RUN: grep {ret i1 false}
|
||||
|
||||
bool %foo() {
|
||||
%X = and bool false, undef
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis | grep 'ret i101 12'
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis | grep {ret i101 12}
|
||||
|
||||
@Y = constant [6 x i101] [ i101 12, i101 123456789000000, i101 -12,i101
|
||||
-123456789000000, i101 0,i101 9123456789000000]
|
||||
|
@ -1,7 +1,6 @@
|
||||
; This is a basic sanity check for constant propogation. The add instruction
|
||||
; should be eliminated.
|
||||
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis -o /dev/null -f &&
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep add
|
||||
|
||||
define i128 @test(i1 %B) {
|
||||
|
@ -1,7 +1,6 @@
|
||||
; This is a basic sanity check for constant propogation. The add instruction
|
||||
; and phi instruction should be eliminated.
|
||||
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis -o /dev/null -f &&
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep phi
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep add
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
; arithmatic operations.
|
||||
|
||||
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis -o /dev/null -f &&
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep mul
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep umod
|
||||
|
||||
@ -16,7 +15,7 @@ BB1:
|
||||
BB2:
|
||||
%f1 = udiv i128 -1, 1
|
||||
%f2 = add i128 %f1, 1
|
||||
%f3 = umod i128 %f2, 2121
|
||||
%f3 = urem i128 %f2, 2121
|
||||
br label %BB3
|
||||
BB3:
|
||||
%Ret = phi i128 [%t3, %BB1], [%f3, %BB2]
|
||||
|
@ -2,10 +2,9 @@
|
||||
; logic operations.
|
||||
|
||||
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis -o /dev/null -f &&
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep and
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep trunc
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis | grep "ret i100 -1"
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis | grep {ret i100 -1}
|
||||
|
||||
define i100 @test(i133 %A) {
|
||||
%B = and i133 0, %A
|
||||
|
@ -1,5 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis -o /dev/null -f &&
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep '%X'
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep %X
|
||||
|
||||
@G = global [1000000 x i10000] zeroinitializer
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis -o /dev/null -f &&
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep xor
|
||||
|
||||
define i11129 @test1() {
|
||||
|
@ -1,4 +1,3 @@
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis -o /dev/null -f &&
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep load
|
||||
|
||||
@Y = constant [6 x i101] [ i101 12, i101 123456789000000, i101 -12,
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | grep -v 'ret i512 undef' | grep 'ret i8 2'
|
||||
; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | grep -v {ret i512 undef} | \
|
||||
; RUN: grep {ret i8 2}
|
||||
|
||||
define internal i512 @test(i1 %B) {
|
||||
br i1 %B, label %BB1, label %BB2
|
||||
|
@ -1,7 +1,5 @@
|
||||
; RUN: llvm-as < %s | opt -ipsccp | llvm-dis -o /dev/null -f &&
|
||||
; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | grep -v 'ret i101 0' | \
|
||||
; RUN: grep -v 'ret i101 undef' | not grep ret
|
||||
|
||||
; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | grep -v {ret i101 0} | \
|
||||
; RUN: grep -v {ret i101 undef} | not grep ret
|
||||
|
||||
|
||||
define internal i101 @bar(i101 %A) {
|
||||
|
@ -1,4 +1,3 @@
|
||||
; RUN: llvm-as < %s | opt -ipsccp | llvm-dis -o /dev/null -f &&
|
||||
; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | not grep global
|
||||
|
||||
@G = internal global i66 undef
|
||||
|
@ -1,7 +1,5 @@
|
||||
; This test makes sure that these instructions are properly constant propagated.
|
||||
;
|
||||
|
||||
; RUN: llvm-as < %s | opt -ipsccp | llvm-dis -o /dev/null -f &&
|
||||
; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | not grep load
|
||||
; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | not grep add
|
||||
; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | not grep phi
|
||||
|
@ -1,7 +1,5 @@
|
||||
; This test makes sure that these instructions are properly constant propagated.
|
||||
;
|
||||
|
||||
; RUN: llvm-as < %s | opt -ipsccp | llvm-dis -o /dev/null -f &&
|
||||
; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | not grep load
|
||||
; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | not grep fdiv
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis -o /dev/null -f &&
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep phi
|
||||
|
||||
define i999 @test(i999%A, i1 %c) {
|
||||
|
@ -1,4 +1,3 @@
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis -o /dev/null -f &&
|
||||
; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep select
|
||||
|
||||
@A = constant i32 10
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -adce -simplifycfg | llvm-dis | not grep br
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -adce -simplifycfg | llvm-dis | \
|
||||
; RUN: not grep br
|
||||
|
||||
; No matter how hard you try, sqrt(1.0) is always 1.0. This allows the
|
||||
; optimizer to delete this loop.
|
||||
|
@ -1,3 +1,3 @@
|
||||
load_lib llvm-dg.exp
|
||||
load_lib llvm.exp
|
||||
|
||||
llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
|
||||
RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -ipsccp | llvm-dis | grep -v 'ret i32 17' | grep -v 'ret i32 undef' | not grep ret
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -ipsccp | llvm-dis | \
|
||||
; RUN: grep -v {ret i32 17} | grep -v {ret i32 undef} | not grep ret
|
||||
|
||||
implementation
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -ipsccp | llvm-dis | grep -v 'ret i32 0' | grep -v 'ret i32 undef' | not grep ret
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -ipsccp | llvm-dis | \
|
||||
; RUN: grep -v {ret i32 0} | grep -v {ret i32 undef} | not grep ret
|
||||
|
||||
implementation
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | grep 'ret i32 0'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | grep {ret i32 0}
|
||||
|
||||
; Test that SCCP has basic knowledge of when and/or nuke overdefined values.
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -dce -simplifycfg | llvm-dis | not grep br
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -dce -simplifycfg | llvm-dis | \
|
||||
; RUN: not grep br
|
||||
|
||||
int %test(int %param) {
|
||||
entry:
|
||||
|
@ -1,7 +1,8 @@
|
||||
; This is the test case taken from appel's book that illustrates a hard case
|
||||
; that SCCP gets right. BB3 should be completely eliminated.
|
||||
;
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -constprop -dce -cfgsimplify | llvm-dis | not grep BB3
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -constprop -dce -simplifycfg | \
|
||||
; RUN: llvm-dis | not grep BB3
|
||||
|
||||
int %testfunction(int %i0, int %j0) {
|
||||
BB1:
|
||||
|
@ -1,4 +1,3 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -disable-output &&
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | not grep select
|
||||
|
||||
int %test1(bool %C) {
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep alloca | grep '4 x'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \
|
||||
; RUN: grep alloca | grep {4 x}
|
||||
|
||||
; Test that an array is not incorrectly deconstructed...
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
; Scalar replacement was incorrectly promoting this alloca!!
|
||||
;
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | sed 's/;.*//g' | grep '\['
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \
|
||||
; RUN: sed {s/;.*//g} | grep \[
|
||||
|
||||
sbyte *%test() {
|
||||
%A = alloca [30 x sbyte]
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep alloca | grep '{'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \
|
||||
; RUN: grep alloca | grep \{
|
||||
implementation ; Functions:
|
||||
|
||||
declare int %.callback_1(sbyte*)
|
||||
|
@ -1,5 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis &&
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep -F 'alloca [2 x <4 x i32>]'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \
|
||||
; RUN: grep -F {alloca \[2 x <4 x i32>\]}
|
||||
|
||||
int %func(<4 x float> %v0, <4 x float> %v1) {
|
||||
%vsiidx = alloca [2 x <4 x int>], align 16 ; <[2 x <4 x int>]*> [#uses=3]
|
||||
|
@ -1,3 +1,3 @@
|
||||
load_lib llvm-dg.exp
|
||||
load_lib llvm.exp
|
||||
|
||||
llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
|
||||
RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
|
||||
|
@ -1,6 +1,9 @@
|
||||
; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | not grep 'call void @llvm.memcpy.i32' &&
|
||||
; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | grep 'getelementptr'
|
||||
; PR1226
|
||||
; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | \
|
||||
; RUN: not grep {call void @llvm.memcpy.i32}
|
||||
; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | grep getelementptr
|
||||
; END.
|
||||
|
||||
target datalayout = "E-p:32:32"
|
||||
target triple = "powerpc-apple-darwin8.8.0"
|
||||
%struct.foo = type { i8, i8 }
|
||||
|
@ -1,6 +1,6 @@
|
||||
; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | grep 'ret i32 16843009' &&
|
||||
; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | not grep alloca
|
||||
; PR1226
|
||||
; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | grep {ret i32 16843009}
|
||||
; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | not grep alloca
|
||||
|
||||
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"
|
||||
target triple = "i686-apple-darwin8"
|
||||
|
@ -1,5 +1,9 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | not grep alloca &&
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep 'bitcast.*float.*i32'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \
|
||||
; RUN: not grep alloca
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \
|
||||
; RUN: grep {bitcast.*float.*i32}
|
||||
|
||||
implementation
|
||||
|
||||
int %test(float %X) {
|
||||
%X_addr = alloca float
|
||||
|
@ -1,5 +1,7 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | not grep alloca &&
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep 'bitcast'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \
|
||||
; RUN: not grep alloca
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \
|
||||
; RUN: grep bitcast
|
||||
|
||||
target endian = little
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | not grep alloca &&
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep 'ret i8'
|
||||
|
||||
; PR892
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \
|
||||
; RUN: not grep alloca
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep {ret i8}
|
||||
|
||||
target endian = little
|
||||
target pointersize = 32
|
||||
|
@ -1,6 +1,7 @@
|
||||
; Basic block #2 should not be merged into BB #3!
|
||||
;
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | grep 'br label'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \
|
||||
; RUN: grep {br label}
|
||||
;
|
||||
declare void %foo()
|
||||
implementation
|
||||
|
@ -1,7 +1,8 @@
|
||||
; This test checks to make sure that 'br X, Dest, Dest' is folded into
|
||||
; 'br Dest'
|
||||
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'br bool %c2'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \
|
||||
; RUN: not grep {br bool %c2}
|
||||
|
||||
declare void %noop()
|
||||
|
||||
|
@ -3,7 +3,8 @@
|
||||
; due to the fact that the SimplifyCFG function does not use
|
||||
; the ConstantFoldTerminator function.
|
||||
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'br bool %c2'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \
|
||||
; RUN: not grep {br bool %c2}
|
||||
|
||||
declare void %noop()
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep switch
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \
|
||||
; RUN: not grep switch
|
||||
|
||||
int %test1() { ; Test normal folding
|
||||
switch uint 5, label %Default [
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -disable-output
|
||||
; END.
|
||||
|
||||
%arraytype.1.Char = type { int, [0 x sbyte] }
|
||||
%arraytype.4.Signed = type { int, [0 x int] }
|
||||
|
@ -1,6 +1,8 @@
|
||||
; Make sure this doesn't turn into an infinite loop
|
||||
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -constprop -simplifycfg | llvm-dis | grep bb86
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -constprop -simplifycfg |\
|
||||
; RUN: llvm-dis | grep bb86
|
||||
; END.
|
||||
|
||||
%struct.anon = type { uint, int, int, int, [1024 x sbyte] }
|
||||
%_zero_ = external global %struct.anon* ; <%struct.anon**> [#uses=2]
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse -simplifycfg -disable-output
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse -simplifycfg \
|
||||
; RUN: -disable-output
|
||||
; PR867
|
||||
|
||||
target endian = big
|
||||
|
@ -1,7 +1,6 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -disable-output &&
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep select
|
||||
|
||||
; PR957
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \
|
||||
; RUN: not grep select
|
||||
|
||||
uint %test(uint %tmp) {
|
||||
cond_false179: ; preds = %cond_true
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis
|
||||
; END.
|
||||
; ModuleID = 'bugpoint-tooptimize.bc'
|
||||
target datalayout = "e-p:32:32"
|
||||
target endian = little
|
||||
|
@ -1,4 +1,6 @@
|
||||
;RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'br label'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \
|
||||
; RUN: not grep {br label}
|
||||
|
||||
void %test(bool %C) {
|
||||
br bool %C, label %A, label %B
|
||||
A:
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'icmp eq'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \
|
||||
; RUN: not grep {icmp eq}
|
||||
|
||||
; Check that simplifycfg deletes a dead 'seteq' instruction when it
|
||||
; folds a conditional branch into a switch instruction.
|
||||
|
@ -1,6 +1,6 @@
|
||||
; Test merging of blocks with phi nodes.
|
||||
;
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'N:'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep N:
|
||||
;
|
||||
|
||||
int %test(bool %a) {
|
||||
|
@ -3,7 +3,8 @@
|
||||
|
||||
; If this test is successful, the function should be reduced to 'call; ret'
|
||||
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not egrep 'invoke|br'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \
|
||||
; RUN: not egrep {\\(invoke\\)|\\(br\\)}
|
||||
|
||||
declare void %bar()
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
; Test merging of blocks that only have PHI nodes in them
|
||||
;
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'N:'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep N:
|
||||
;
|
||||
|
||||
int %test(bool %a, bool %b) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
; where the mergedinto block doesn't have any PHI nodes, and is in fact
|
||||
; dominated by the block-to-be-eliminated
|
||||
;
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'N:'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep N:
|
||||
;
|
||||
|
||||
int %test(bool %a, bool %b) {
|
||||
|
@ -4,7 +4,8 @@
|
||||
; 'if conversion'.
|
||||
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis > %t.xform
|
||||
; RUN: not grep phi %t.xform && grep ret %t.xform
|
||||
; RUN: not grep phi %t.xform
|
||||
; RUN: grep ret %t.xform
|
||||
|
||||
declare void %use(bool)
|
||||
declare void %use(int)
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep select
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \
|
||||
; RUN: not grep select
|
||||
|
||||
;; The PHI node in this example should not be turned into a select, as we are
|
||||
;; not able to ifcvt the entire block. As such, converting to a select just
|
||||
|
@ -2,7 +2,8 @@
|
||||
; a PHI node and a return. Make sure the simplify cfg can straighten out this
|
||||
; important case. This is basically the most trivial form of tail-duplication.
|
||||
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'br label'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \
|
||||
; RUN: not grep {br label}
|
||||
|
||||
int %test(bool %B, int %A, int %B) {
|
||||
br bool %B, label %T, label %F
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -instcombine -simplifycfg | llvm-dis | not grep call
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -instcombine \
|
||||
; RUN: -simplifycfg | llvm-dis | not grep call
|
||||
|
||||
declare void %bar()
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | grep 'br i1' | wc -l | grep 1
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | grep {br i1} | wc -l | grep 1
|
||||
|
||||
void %test(int* %P, int* %Q, bool %A, bool %B) {
|
||||
br bool %A, label %a, label %b ;; fold the two branches into one
|
||||
|
@ -1,5 +1,7 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -adce | llvm-dis | not grep 'call void %f1' &&
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -adce -disable-output
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -adce | llvm-dis | \
|
||||
; RUN: not grep {call void %f1}
|
||||
; END.
|
||||
|
||||
declare void %f1()
|
||||
declare void %f2()
|
||||
declare void %f3()
|
||||
|
@ -1,3 +1,3 @@
|
||||
load_lib llvm-dg.exp
|
||||
load_lib llvm.exp
|
||||
|
||||
llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
|
||||
RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'br'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep br
|
||||
declare void %bar(int)
|
||||
|
||||
void %test(bool %P, int* %Q) {
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'br'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep br
|
||||
; END.
|
||||
|
||||
bool %_ZN4llvm11SetCondInst7classofEPKNS_11InstructionE({uint, uint}* %I) {
|
||||
entry:
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | grep switch | wc -l | grep 1
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \
|
||||
; RUN: grep switch | wc -l | grep 1
|
||||
|
||||
; Test that a switch going to a switch on the same value can be merged. All
|
||||
; three switches in this example can be merged into one big one.
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'call void %DEAD'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \
|
||||
; RUN: not grep {call void %DEAD}
|
||||
|
||||
; Test that we can thread a simple known condition through switch statements.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user