aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/SimplifyCFG
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/SimplifyCFG')
-rw-r--r--test/Transforms/SimplifyCFG/2002-05-05-EmptyBlockMerge.ll3
-rw-r--r--test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll3
-rw-r--r--test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll3
-rw-r--r--test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll3
-rw-r--r--test/Transforms/SimplifyCFG/2005-08-03-PHIFactorCrash.ll1
-rw-r--r--test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll4
-rw-r--r--test/Transforms/SimplifyCFG/2006-08-03-Crash.ll3
-rw-r--r--test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll5
-rw-r--r--test/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll1
-rw-r--r--test/Transforms/SimplifyCFG/BrUnwind.ll4
-rw-r--r--test/Transforms/SimplifyCFG/DeadSetCC.ll3
-rw-r--r--test/Transforms/SimplifyCFG/EqualPHIEdgeBlockMerge.ll2
-rw-r--r--test/Transforms/SimplifyCFG/InvokeEliminate.ll3
-rw-r--r--test/Transforms/SimplifyCFG/PhiBlockMerge.ll2
-rw-r--r--test/Transforms/SimplifyCFG/PhiBlockMerge2.ll2
-rw-r--r--test/Transforms/SimplifyCFG/PhiEliminate.ll3
-rw-r--r--test/Transforms/SimplifyCFG/PhiNoEliminate.ll3
-rw-r--r--test/Transforms/SimplifyCFG/UncondBranchToReturn.ll3
-rw-r--r--test/Transforms/SimplifyCFG/branch-cond-merge.ll3
-rw-r--r--test/Transforms/SimplifyCFG/branch-fold.ll2
-rw-r--r--test/Transforms/SimplifyCFG/branch-phi-thread.ll6
-rw-r--r--test/Transforms/SimplifyCFG/dg.exp4
-rw-r--r--test/Transforms/SimplifyCFG/hoist-common-code.ll2
-rw-r--r--test/Transforms/SimplifyCFG/switch_formation.ll3
-rw-r--r--test/Transforms/SimplifyCFG/switch_switch_fold.ll3
-rw-r--r--test/Transforms/SimplifyCFG/switch_thread.ll3
26 files changed, 49 insertions, 28 deletions
diff --git a/test/Transforms/SimplifyCFG/2002-05-05-EmptyBlockMerge.ll b/test/Transforms/SimplifyCFG/2002-05-05-EmptyBlockMerge.ll
index 9d2fe54..7f0a57c 100644
--- a/test/Transforms/SimplifyCFG/2002-05-05-EmptyBlockMerge.ll
+++ b/test/Transforms/SimplifyCFG/2002-05-05-EmptyBlockMerge.ll
@@ -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
diff --git a/test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll b/test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll
index 523205b..fcefac1 100644
--- a/test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll
+++ b/test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll
@@ -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()
diff --git a/test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll b/test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll
index 1fafe77..08ff290 100644
--- a/test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll
+++ b/test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll
@@ -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()
diff --git a/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll b/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll
index 91cb68b..ac9ba18 100644
--- a/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll
+++ b/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll
@@ -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 [
diff --git a/test/Transforms/SimplifyCFG/2005-08-03-PHIFactorCrash.ll b/test/Transforms/SimplifyCFG/2005-08-03-PHIFactorCrash.ll
index 3f3951a..4ac692e 100644
--- a/test/Transforms/SimplifyCFG/2005-08-03-PHIFactorCrash.ll
+++ b/test/Transforms/SimplifyCFG/2005-08-03-PHIFactorCrash.ll
@@ -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] }
diff --git a/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll b/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll
index eabedf9..ca69970 100644
--- a/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll
+++ b/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll
@@ -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]
diff --git a/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll b/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll
index b796dee..a224a2f 100644
--- a/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll
+++ b/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll
@@ -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
diff --git a/test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll b/test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll
index 8e583e8..26fce45 100644
--- a/test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll
+++ b/test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll
@@ -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
diff --git a/test/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll b/test/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll
index 2063d9f..3756fcb 100644
--- a/test/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll
+++ b/test/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll
@@ -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
diff --git a/test/Transforms/SimplifyCFG/BrUnwind.ll b/test/Transforms/SimplifyCFG/BrUnwind.ll
index 94008b0..73bd975 100644
--- a/test/Transforms/SimplifyCFG/BrUnwind.ll
+++ b/test/Transforms/SimplifyCFG/BrUnwind.ll
@@ -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:
diff --git a/test/Transforms/SimplifyCFG/DeadSetCC.ll b/test/Transforms/SimplifyCFG/DeadSetCC.ll
index 96337f7..ea215e3 100644
--- a/test/Transforms/SimplifyCFG/DeadSetCC.ll
+++ b/test/Transforms/SimplifyCFG/DeadSetCC.ll
@@ -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.
diff --git a/test/Transforms/SimplifyCFG/EqualPHIEdgeBlockMerge.ll b/test/Transforms/SimplifyCFG/EqualPHIEdgeBlockMerge.ll
index 4b643c6..3c1f141 100644
--- a/test/Transforms/SimplifyCFG/EqualPHIEdgeBlockMerge.ll
+++ b/test/Transforms/SimplifyCFG/EqualPHIEdgeBlockMerge.ll
@@ -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) {
diff --git a/test/Transforms/SimplifyCFG/InvokeEliminate.ll b/test/Transforms/SimplifyCFG/InvokeEliminate.ll
index cbce416..89d76a8 100644
--- a/test/Transforms/SimplifyCFG/InvokeEliminate.ll
+++ b/test/Transforms/SimplifyCFG/InvokeEliminate.ll
@@ -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()
diff --git a/test/Transforms/SimplifyCFG/PhiBlockMerge.ll b/test/Transforms/SimplifyCFG/PhiBlockMerge.ll
index 881944f..7b24426 100644
--- a/test/Transforms/SimplifyCFG/PhiBlockMerge.ll
+++ b/test/Transforms/SimplifyCFG/PhiBlockMerge.ll
@@ -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) {
diff --git a/test/Transforms/SimplifyCFG/PhiBlockMerge2.ll b/test/Transforms/SimplifyCFG/PhiBlockMerge2.ll
index 7e80677..01060ed 100644
--- a/test/Transforms/SimplifyCFG/PhiBlockMerge2.ll
+++ b/test/Transforms/SimplifyCFG/PhiBlockMerge2.ll
@@ -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) {
diff --git a/test/Transforms/SimplifyCFG/PhiEliminate.ll b/test/Transforms/SimplifyCFG/PhiEliminate.ll
index 9411b33..ef2433c 100644
--- a/test/Transforms/SimplifyCFG/PhiEliminate.ll
+++ b/test/Transforms/SimplifyCFG/PhiEliminate.ll
@@ -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)
diff --git a/test/Transforms/SimplifyCFG/PhiNoEliminate.ll b/test/Transforms/SimplifyCFG/PhiNoEliminate.ll
index 1eb07b3..4535541 100644
--- a/test/Transforms/SimplifyCFG/PhiNoEliminate.ll
+++ b/test/Transforms/SimplifyCFG/PhiNoEliminate.ll
@@ -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
diff --git a/test/Transforms/SimplifyCFG/UncondBranchToReturn.ll b/test/Transforms/SimplifyCFG/UncondBranchToReturn.ll
index a3ed678..6ab1621 100644
--- a/test/Transforms/SimplifyCFG/UncondBranchToReturn.ll
+++ b/test/Transforms/SimplifyCFG/UncondBranchToReturn.ll
@@ -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
diff --git a/test/Transforms/SimplifyCFG/branch-cond-merge.ll b/test/Transforms/SimplifyCFG/branch-cond-merge.ll
index ca5f3e4..2a93057 100644
--- a/test/Transforms/SimplifyCFG/branch-cond-merge.ll
+++ b/test/Transforms/SimplifyCFG/branch-cond-merge.ll
@@ -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()
diff --git a/test/Transforms/SimplifyCFG/branch-fold.ll b/test/Transforms/SimplifyCFG/branch-fold.ll
index b22337c..f13f826 100644
--- a/test/Transforms/SimplifyCFG/branch-fold.ll
+++ b/test/Transforms/SimplifyCFG/branch-fold.ll
@@ -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
diff --git a/test/Transforms/SimplifyCFG/branch-phi-thread.ll b/test/Transforms/SimplifyCFG/branch-phi-thread.ll
index 3b8d188..e370978 100644
--- a/test/Transforms/SimplifyCFG/branch-phi-thread.ll
+++ b/test/Transforms/SimplifyCFG/branch-phi-thread.ll
@@ -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()
diff --git a/test/Transforms/SimplifyCFG/dg.exp b/test/Transforms/SimplifyCFG/dg.exp
index ff34508..879685c 100644
--- a/test/Transforms/SimplifyCFG/dg.exp
+++ b/test/Transforms/SimplifyCFG/dg.exp
@@ -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}]]
diff --git a/test/Transforms/SimplifyCFG/hoist-common-code.ll b/test/Transforms/SimplifyCFG/hoist-common-code.ll
index b19eac9..482c5aa 100644
--- a/test/Transforms/SimplifyCFG/hoist-common-code.ll
+++ b/test/Transforms/SimplifyCFG/hoist-common-code.ll
@@ -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) {
diff --git a/test/Transforms/SimplifyCFG/switch_formation.ll b/test/Transforms/SimplifyCFG/switch_formation.ll
index e13f239..b372ca4b 100644
--- a/test/Transforms/SimplifyCFG/switch_formation.ll
+++ b/test/Transforms/SimplifyCFG/switch_formation.ll
@@ -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:
diff --git a/test/Transforms/SimplifyCFG/switch_switch_fold.ll b/test/Transforms/SimplifyCFG/switch_switch_fold.ll
index 8bc5b8d..5403955 100644
--- a/test/Transforms/SimplifyCFG/switch_switch_fold.ll
+++ b/test/Transforms/SimplifyCFG/switch_switch_fold.ll
@@ -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.
diff --git a/test/Transforms/SimplifyCFG/switch_thread.ll b/test/Transforms/SimplifyCFG/switch_thread.ll
index 60b045f..f120851 100644
--- a/test/Transforms/SimplifyCFG/switch_thread.ll
+++ b/test/Transforms/SimplifyCFG/switch_thread.ll
@@ -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.