[test] Update some test cases to use -passes when specifying the pipeline
This updates transform test cases for
ADCE
AddDiscriminators
AggressiveInstCombine
AlignmentFromAssumptions
ArgumentPromotion
BDCE
CalledValuePropagation
DCE
Reg2Mem
WholeProgramDevirt
to use the -passes syntax when specifying the pipeline.
Given that LLVM_ENABLE_NEW_PASS_MANAGER isn't set to off (which is
a deprecated feature) the updated test cases already used the new
pass manager, but they were using the legacy syntax when specifying
the passes to run. This patch can be seen as a step toward deprecating
that interface.
This patch also removes some redundant RUN lines. Here I am
referring to test cases that had multiple RUN lines verifying both
the legacy "-passname" syntax and the new "-passes=passname" syntax.
Since we switched the default pass manager to "new PM" both RUN lines
have verified the new PM version of the pass (more or less wasting
time running the same test twice), unless LLVM_ENABLE_NEW_PASS_MANAGER
is set to "off". It is assumed that it is enough to run these tests
with the new pass manager now.
Differential Revision: https://reviews.llvm.org/D108472
diff --git a/llvm/test/Transforms/ADCE/2002-01-31-UseStuckAround.ll b/llvm/test/Transforms/ADCE/2002-01-31-UseStuckAround.ll
index 8910bda..3032c6f 100644
--- a/llvm/test/Transforms/ADCE/2002-01-31-UseStuckAround.ll
+++ b/llvm/test/Transforms/ADCE/2002-01-31-UseStuckAround.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -adce
+; RUN: opt < %s -passes=adce
define i32 @"main"(i32 %argc) {
br label %2
diff --git a/llvm/test/Transforms/ADCE/2002-05-22-PHITest.ll b/llvm/test/Transforms/ADCE/2002-05-22-PHITest.ll
index 0095be1..20c72d9 100644
--- a/llvm/test/Transforms/ADCE/2002-05-22-PHITest.ll
+++ b/llvm/test/Transforms/ADCE/2002-05-22-PHITest.ll
@@ -1,6 +1,6 @@
; It is illegal to remove BB1 because it will mess up the PHI node!
;
-; RUN: opt < %s -adce -S | grep BB1
+; RUN: opt < %s -passes=adce -S | grep BB1
define i32 @test(i1 %C, i32 %A, i32 %B) {
; <label>:0
diff --git a/llvm/test/Transforms/ADCE/2002-05-23-ZeroArgPHITest.ll b/llvm/test/Transforms/ADCE/2002-05-23-ZeroArgPHITest.ll
index a9da9c7..1de9d94 100644
--- a/llvm/test/Transforms/ADCE/2002-05-23-ZeroArgPHITest.ll
+++ b/llvm/test/Transforms/ADCE/2002-05-23-ZeroArgPHITest.ll
@@ -1,12 +1,12 @@
; This testcase contains a entire loop that should be removed. The only thing
; left is the store instruction in BB0. The problem this testcase was running
-; into was that when the reg109 PHI was getting zero predecessors, it was
+; into was that when the reg109 PHI was getting zero predecessors, it was
; removed even though there were uses still around. Now the uses are filled
; in with a dummy value before the PHI is deleted.
;
-; RUN: opt < %s -S -adce | grep bb1
-; RUN: opt < %s -S -adce -adce-remove-loops | FileCheck %s
-
+; RUN: opt < %s -S -passes=adce | grep bb1
+; RUN: opt < %s -S -passes=adce -adce-remove-loops | FileCheck %s
+
%node_t = type { double*, %node_t*, %node_t**, double**, double*, i32, i32 }
define void @localize_local(%node_t* %nodelist) {
diff --git a/llvm/test/Transforms/ADCE/2002-05-28-Crash-distilled.ll b/llvm/test/Transforms/ADCE/2002-05-28-Crash-distilled.ll
index 2fefd0a..bb9bc4a 100644
--- a/llvm/test/Transforms/ADCE/2002-05-28-Crash-distilled.ll
+++ b/llvm/test/Transforms/ADCE/2002-05-28-Crash-distilled.ll
@@ -1,7 +1,7 @@
; This testcase is a distilled form of: 2002-05-28-Crash.ll
-; RUN: opt < %s -adce
-; RUN: opt < %s -adce -adce-remove-loops -S | FileCheck %s
+; RUN: opt < %s -passes=adce
+; RUN: opt < %s -passes=adce -adce-remove-loops -S | FileCheck %s
define float @test(i32 %i) {
%F = sitofp i32 %i to float ; <float> [#uses=1]
diff --git a/llvm/test/Transforms/ADCE/2002-05-28-Crash.ll b/llvm/test/Transforms/ADCE/2002-05-28-Crash.ll
index 3090792..90825a1 100644
--- a/llvm/test/Transforms/ADCE/2002-05-28-Crash.ll
+++ b/llvm/test/Transforms/ADCE/2002-05-28-Crash.ll
@@ -1,4 +1,4 @@
-; This testcase is distilled from the GNU rx package. The loop should be
+; This testcase is distilled from the GNU rx package. The loop should be
; removed but causes a problem when ADCE does. The source function is:
; int rx_bitset_empty (int size, rx_Bitset set) {
; int x;
@@ -11,8 +11,8 @@
; return !s;
;}
;
-; RUN: opt < %s -adce
-; RUN: opt < %s -adce -adce-remove-loops -S | FileCheck %s
+; RUN: opt < %s -passes=adce
+; RUN: opt < %s -passes=adce -adce-remove-loops -S | FileCheck %s
define i32 @rx_bitset_empty(i32 %size, i32* %set) {
bb1:
diff --git a/llvm/test/Transforms/ADCE/2002-07-17-AssertionFailure.ll b/llvm/test/Transforms/ADCE/2002-07-17-AssertionFailure.ll
index a83d856..2fe8aa8 100644
--- a/llvm/test/Transforms/ADCE/2002-07-17-AssertionFailure.ll
+++ b/llvm/test/Transforms/ADCE/2002-07-17-AssertionFailure.ll
@@ -3,7 +3,7 @@
; block in this function, it would work fine, but that would be the part we
; have to fix now, wouldn't it....
;
-; RUN: opt < %s -adce -S | FileCheck %s
+; RUN: opt < %s -passes=adce -S | FileCheck %s
define void @foo(i8* %reg5481) {
%cast611 = bitcast i8* %reg5481 to i8** ; <i8**> [#uses=1]
diff --git a/llvm/test/Transforms/ADCE/2002-07-17-PHIAssertion.ll b/llvm/test/Transforms/ADCE/2002-07-17-PHIAssertion.ll
index bb8ef26..143c199 100644
--- a/llvm/test/Transforms/ADCE/2002-07-17-PHIAssertion.ll
+++ b/llvm/test/Transforms/ADCE/2002-07-17-PHIAssertion.ll
@@ -1,6 +1,6 @@
; This testcase was extracted from the gzip SPEC benchmark
;
-; RUN: opt < %s -adce | FileCheck %s
+; RUN: opt < %s -passes=adce | FileCheck %s
@bk = external global i32 ; <i32*> [#uses=2]
@hufts = external global i32 ; <i32*> [#uses=1]
diff --git a/llvm/test/Transforms/ADCE/2002-07-29-Segfault.ll b/llvm/test/Transforms/ADCE/2002-07-29-Segfault.ll
index 6745555..20b6e18 100644
--- a/llvm/test/Transforms/ADCE/2002-07-29-Segfault.ll
+++ b/llvm/test/Transforms/ADCE/2002-07-29-Segfault.ll
@@ -1,5 +1,5 @@
-; RUN: opt < %s -adce -disable-output
-; RUN: opt < %s -adce -disable-output -adce-remove-loops
+; RUN: opt < %s -passes=adce -disable-output
+; RUN: opt < %s -passes=adce -disable-output -adce-remove-loops
define void @test() {
br label %BB3
diff --git a/llvm/test/Transforms/ADCE/2003-01-22-PredecessorProblem.ll b/llvm/test/Transforms/ADCE/2003-01-22-PredecessorProblem.ll
index ac395de..50a796f 100644
--- a/llvm/test/Transforms/ADCE/2003-01-22-PredecessorProblem.ll
+++ b/llvm/test/Transforms/ADCE/2003-01-22-PredecessorProblem.ll
@@ -1,6 +1,6 @@
; Testcase reduced from 197.parser by bugpoint
-; RUN: opt < %s -adce
-; RUN: opt < %s -adce -adce-remove-loops -S | FileCheck %s
+; RUN: opt < %s -passes=adce
+; RUN: opt < %s -passes=adce -adce-remove-loops -S | FileCheck %s
define void @conjunction_prune() {
; <label>:0
diff --git a/llvm/test/Transforms/ADCE/2003-04-25-PHIPostDominateProblem.ll b/llvm/test/Transforms/ADCE/2003-04-25-PHIPostDominateProblem.ll
index 37adba5..151685b 100644
--- a/llvm/test/Transforms/ADCE/2003-04-25-PHIPostDominateProblem.ll
+++ b/llvm/test/Transforms/ADCE/2003-04-25-PHIPostDominateProblem.ll
@@ -2,8 +2,8 @@
; entries for it's postdominator. But I think this can only happen when the
; PHI node is dead, so we just avoid patching up dead PHI nodes.
-; RUN: opt < %s -adce -S | FileCheck %s
-; RUN: opt < %s -adce -adce-remove-loops -S | FileCheck %s
+; RUN: opt < %s -passes=adce -S | FileCheck %s
+; RUN: opt < %s -passes=adce -adce-remove-loops -S | FileCheck %s
target datalayout = "e-p:32:32"
diff --git a/llvm/test/Transforms/ADCE/2003-06-11-InvalidCFG.ll b/llvm/test/Transforms/ADCE/2003-06-11-InvalidCFG.ll
index 8ff98b7..97121f1 100644
--- a/llvm/test/Transforms/ADCE/2003-06-11-InvalidCFG.ll
+++ b/llvm/test/Transforms/ADCE/2003-06-11-InvalidCFG.ll
@@ -1,5 +1,5 @@
-; RUN: opt < %s -adce -disable-output
-; RUN: opt < %s -adce -adce-remove-loops -disable-output
+; RUN: opt < %s -passes=adce -disable-output
+; RUN: opt < %s -passes=adce -adce-remove-loops -disable-output
@G = external global i32* ; <i32**> [#uses=1]
diff --git a/llvm/test/Transforms/ADCE/2003-06-24-BadSuccessor.ll b/llvm/test/Transforms/ADCE/2003-06-24-BadSuccessor.ll
index 4851365..f6cdab9 100644
--- a/llvm/test/Transforms/ADCE/2003-06-24-BadSuccessor.ll
+++ b/llvm/test/Transforms/ADCE/2003-06-24-BadSuccessor.ll
@@ -1,5 +1,5 @@
-; RUN: opt < %s -adce -disable-output
-; RUN: opt < %s -adce -adce-remove-loops=true -disable-output
+; RUN: opt < %s -passes=adce -disable-output
+; RUN: opt < %s -passes=adce -adce-remove-loops=true -disable-output
target datalayout = "e-p:32:32"
%struct..CppObjTypeDesc = type { i32, i16, i16 }
diff --git a/llvm/test/Transforms/ADCE/2003-06-24-BasicFunctionality.ll b/llvm/test/Transforms/ADCE/2003-06-24-BasicFunctionality.ll
index ac2a30d..7de1351 100644
--- a/llvm/test/Transforms/ADCE/2003-06-24-BasicFunctionality.ll
+++ b/llvm/test/Transforms/ADCE/2003-06-24-BasicFunctionality.ll
@@ -1,5 +1,5 @@
-; RUN: opt < %s -adce -S | FileCheck %s
-; RUN: opt < %s -adce -adce-remove-loops -S | FileCheck %s
+; RUN: opt < %s -passes=adce -S | FileCheck %s
+; RUN: opt < %s -passes=adce -adce-remove-loops -S | FileCheck %s
define void @dead_test8(i32* %data.1, i32 %idx.1) {
entry:
diff --git a/llvm/test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll b/llvm/test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll
index 607bf2e..4a2a181 100644
--- a/llvm/test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll
+++ b/llvm/test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -adce -disable-output
+; RUN: opt < %s -passes=adce -disable-output
define void @test() personality i32 (...)* @__gxx_personality_v0 {
br i1 false, label %then, label %endif
diff --git a/llvm/test/Transforms/ADCE/2003-09-15-InfLoopCrash.ll b/llvm/test/Transforms/ADCE/2003-09-15-InfLoopCrash.ll
index 458045a..5c30ade 100644
--- a/llvm/test/Transforms/ADCE/2003-09-15-InfLoopCrash.ll
+++ b/llvm/test/Transforms/ADCE/2003-09-15-InfLoopCrash.ll
@@ -1,5 +1,5 @@
-; RUN: opt < %s -adce -disable-output
-; RUN: opt < %s -adce -adce-remove-loops -disable-output
+; RUN: opt < %s -passes=adce -disable-output
+; RUN: opt < %s -passes=adce -adce-remove-loops -disable-output
define i32 @main() {
br label %loop
diff --git a/llvm/test/Transforms/ADCE/2004-05-04-UnreachableBlock.ll b/llvm/test/Transforms/ADCE/2004-05-04-UnreachableBlock.ll
index 123b683..2164334 100644
--- a/llvm/test/Transforms/ADCE/2004-05-04-UnreachableBlock.ll
+++ b/llvm/test/Transforms/ADCE/2004-05-04-UnreachableBlock.ll
@@ -1,5 +1,5 @@
-; RUN: opt < %s -adce -disable-output
-; RUN: opt < %s -adce -adce-remove-loops -disable-output
+; RUN: opt < %s -passes=adce -disable-output
+; RUN: opt < %s -passes=adce -adce-remove-loops -disable-output
define void @test() {
entry:
diff --git a/llvm/test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll b/llvm/test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll
index 068ad2b..8db0b44 100644
--- a/llvm/test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll
+++ b/llvm/test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -adce -disable-output
+; RUN: opt < %s -passes=adce -disable-output
declare void @strlen()
diff --git a/llvm/test/Transforms/ADCE/2017-08-21-DomTree-deletions.ll b/llvm/test/Transforms/ADCE/2017-08-21-DomTree-deletions.ll
index e532f29..47b33cb 100644
--- a/llvm/test/Transforms/ADCE/2017-08-21-DomTree-deletions.ll
+++ b/llvm/test/Transforms/ADCE/2017-08-21-DomTree-deletions.ll
@@ -1,5 +1,5 @@
-; RUN: opt < %s -adce | llvm-dis
-; RUN: opt < %s -adce -verify-dom-info | llvm-dis
+; RUN: opt < %s -passes=adce | llvm-dis
+; RUN: opt < %s -passes=adce -verify-dom-info | llvm-dis
define void @foo() {
entry:
diff --git a/llvm/test/Transforms/ADCE/adce-salvage-dbg-value.ll b/llvm/test/Transforms/ADCE/adce-salvage-dbg-value.ll
index 13e802a..ac2fac9 100644
--- a/llvm/test/Transforms/ADCE/adce-salvage-dbg-value.ll
+++ b/llvm/test/Transforms/ADCE/adce-salvage-dbg-value.ll
@@ -1,5 +1,5 @@
;; Check that adce salvages debug info properly.
-; RUN: opt -adce -S < %s | FileCheck %s
+; RUN: opt -passes=adce -S < %s | FileCheck %s
; ModuleID = 'test.ll'
source_filename = "test.ll"
diff --git a/llvm/test/Transforms/ADCE/basictest1.ll b/llvm/test/Transforms/ADCE/basictest1.ll
index 76bb5cabf6..999af43 100644
--- a/llvm/test/Transforms/ADCE/basictest1.ll
+++ b/llvm/test/Transforms/ADCE/basictest1.ll
@@ -1,5 +1,5 @@
-; RUN: opt < %s -adce -S | FileCheck %s
-; RUN: opt < %s -adce -adce-remove-loops -S | FileCheck %s
+; RUN: opt < %s -passes=adce -S | FileCheck %s
+; RUN: opt < %s -passes=adce -adce-remove-loops -S | FileCheck %s
%FILE = type { i32, i8*, i8*, i8, i8, i32, i32, i32 }
%spec_fd_t = type { i32, i32, i32, i8* }
diff --git a/llvm/test/Transforms/ADCE/basictest2.ll b/llvm/test/Transforms/ADCE/basictest2.ll
index 50336e1..cdcef36 100644
--- a/llvm/test/Transforms/ADCE/basictest2.ll
+++ b/llvm/test/Transforms/ADCE/basictest2.ll
@@ -1,5 +1,5 @@
-; RUN: opt < %s -adce -disable-output
-; RUN: opt < %s -adce -adce-remove-loops -S | FileCheck %s
+; RUN: opt < %s -passes=adce -disable-output
+; RUN: opt < %s -passes=adce -adce-remove-loops -S | FileCheck %s
%FILE = type { i32, i8*, i8*, i8, i8, i32, i32, i32 }
%spec_fd_t = type { i32, i32, i32, i8* }
diff --git a/llvm/test/Transforms/ADCE/blocks-with-dead-term-nondeterministic.ll b/llvm/test/Transforms/ADCE/blocks-with-dead-term-nondeterministic.ll
index 48cdcca..0130233 100644
--- a/llvm/test/Transforms/ADCE/blocks-with-dead-term-nondeterministic.ll
+++ b/llvm/test/Transforms/ADCE/blocks-with-dead-term-nondeterministic.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -adce --preserve-ll-uselistorder -S | FileCheck %s
+; RUN: opt < %s -passes=adce --preserve-ll-uselistorder -S | FileCheck %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.10.0"
diff --git a/llvm/test/Transforms/ADCE/broken-loop-info.ll b/llvm/test/Transforms/ADCE/broken-loop-info.ll
index 70ef12b..74679a1 100644
--- a/llvm/test/Transforms/ADCE/broken-loop-info.ll
+++ b/llvm/test/Transforms/ADCE/broken-loop-info.ll
@@ -1,5 +1,4 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -licm -adce -licm -S < %s | FileCheck %s
; RUN: opt -passes='loop-mssa(licm),adce,loop-mssa(licm)' -S < %s | FileCheck %s
;
diff --git a/llvm/test/Transforms/ADCE/dce_pure_call.ll b/llvm/test/Transforms/ADCE/dce_pure_call.ll
index 88e92bf..f316c7f 100644
--- a/llvm/test/Transforms/ADCE/dce_pure_call.ll
+++ b/llvm/test/Transforms/ADCE/dce_pure_call.ll
@@ -1,4 +1,4 @@
-; RUN: opt -adce -S < %s | not grep call
+; RUN: opt -passes=adce -S < %s | not grep call
declare i32 @strlen(i8*) readonly nounwind willreturn
diff --git a/llvm/test/Transforms/ADCE/dce_pure_invoke.ll b/llvm/test/Transforms/ADCE/dce_pure_invoke.ll
index e01c9fe..c7f591a 100644
--- a/llvm/test/Transforms/ADCE/dce_pure_invoke.ll
+++ b/llvm/test/Transforms/ADCE/dce_pure_invoke.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -adce -S | grep null
+; RUN: opt < %s -passes=adce -S | grep null
declare i32 @strlen(i8*) readnone
diff --git a/llvm/test/Transforms/ADCE/debug-info-intrinsic.ll b/llvm/test/Transforms/ADCE/debug-info-intrinsic.ll
index f32122b..0dd9265e 100644
--- a/llvm/test/Transforms/ADCE/debug-info-intrinsic.ll
+++ b/llvm/test/Transforms/ADCE/debug-info-intrinsic.ll
@@ -1,4 +1,4 @@
-; RUN: opt -adce -S < %s | FileCheck %s
+; RUN: opt -passes=adce -S < %s | FileCheck %s
; Test that debug info intrinsics in dead scopes get eliminated by -adce.
; Generated with 'clang -g -S -emit-llvm | opt -mem2reg -inline' at r262899
diff --git a/llvm/test/Transforms/ADCE/delete-profiling-calls-to-constant.ll b/llvm/test/Transforms/ADCE/delete-profiling-calls-to-constant.ll
index 804b3dd..458ab11 100644
--- a/llvm/test/Transforms/ADCE/delete-profiling-calls-to-constant.ll
+++ b/llvm/test/Transforms/ADCE/delete-profiling-calls-to-constant.ll
@@ -1,4 +1,3 @@
-; RUN: opt < %s -adce -S | FileCheck %s
; RUN: opt < %s -passes=adce -S | FileCheck %s
; Verify that a call to instrument a constant is deleted.
diff --git a/llvm/test/Transforms/ADCE/unreachable-function.ll b/llvm/test/Transforms/ADCE/unreachable-function.ll
index 7c6a30e..d4be728 100644
--- a/llvm/test/Transforms/ADCE/unreachable-function.ll
+++ b/llvm/test/Transforms/ADCE/unreachable-function.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -adce -disable-output
+; RUN: opt < %s -passes=adce -disable-output
define void @test() {
unreachable
diff --git a/llvm/test/Transforms/ADCE/willreturn.ll b/llvm/test/Transforms/ADCE/willreturn.ll
index 61bbbe0..69e6889 100644
--- a/llvm/test/Transforms/ADCE/willreturn.ll
+++ b/llvm/test/Transforms/ADCE/willreturn.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -adce -S < %s | FileCheck %s
+; RUN: opt -passes=adce -S < %s | FileCheck %s
declare void @may_not_return(i32) nounwind readnone
declare void @will_return(i32) nounwind readnone willreturn