[llvm] a3ca7dd - [NewPM][test] Use -passes syntax in Mem2Reg lit tests
Bjorn Pettersson via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 20 08:12:51 PDT 2021
Author: Bjorn Pettersson
Date: 2021-10-20T17:06:47+02:00
New Revision: a3ca7dd0ab9947e0fdde6de5c0d6b1952ac8ac94
URL: https://github.com/llvm/llvm-project/commit/a3ca7dd0ab9947e0fdde6de5c0d6b1952ac8ac94
DIFF: https://github.com/llvm/llvm-project/commit/a3ca7dd0ab9947e0fdde6de5c0d6b1952ac8ac94.diff
LOG: [NewPM][test] Use -passes syntax in Mem2Reg lit tests
The legacy PM is deprecated, so use the new PM syntax in lit tests
verifying the mem2reg pass.
Added:
Modified:
llvm/test/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll
llvm/test/Transforms/Mem2Reg/2003-04-24-MultipleIdenticalSuccessors.ll
llvm/test/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll
llvm/test/Transforms/Mem2Reg/2003-10-05-DeadPHIInsertion.ll
llvm/test/Transforms/Mem2Reg/2005-06-30-ReadBeforeWrite.ll
llvm/test/Transforms/Mem2Reg/2005-11-28-Crash.ll
llvm/test/Transforms/Mem2Reg/ConvertDebugInfo.ll
llvm/test/Transforms/Mem2Reg/ConvertDebugInfo2.ll
llvm/test/Transforms/Mem2Reg/PromoteMemToRegister.ll
llvm/test/Transforms/Mem2Reg/UndefValuesMerge.ll
llvm/test/Transforms/Mem2Reg/alloca_addrspace.ll
llvm/test/Transforms/Mem2Reg/atomic.ll
llvm/test/Transforms/Mem2Reg/crash.ll
llvm/test/Transforms/Mem2Reg/dbg-addr-inline-dse.ll
llvm/test/Transforms/Mem2Reg/dbg-addr.ll
llvm/test/Transforms/Mem2Reg/dbg-inline-scope-for-phi.ll
llvm/test/Transforms/Mem2Reg/debug-alloca-phi-2.ll
llvm/test/Transforms/Mem2Reg/debug-alloca-phi.ll
llvm/test/Transforms/Mem2Reg/debug-alloca-vla-1.ll
llvm/test/Transforms/Mem2Reg/debug-alloca-vla-2.ll
llvm/test/Transforms/Mem2Reg/ignore-droppable.ll
llvm/test/Transforms/Mem2Reg/ignore-lifetime.ll
llvm/test/Transforms/Mem2Reg/optnone.ll
llvm/test/Transforms/Mem2Reg/pr24179.ll
llvm/test/Transforms/Mem2Reg/pr37632-unreachable-list-of-stores.ll
llvm/test/Transforms/Mem2Reg/preserve-nonnull-load-metadata.ll
llvm/test/Transforms/Mem2Reg/undef-order.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll b/llvm/test/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll
index 49b560551d4e5..80d1f02288208 100644
--- a/llvm/test/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll
+++ b/llvm/test/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll
@@ -1,6 +1,6 @@
; Uninitialized values are not handled correctly.
;
-; RUN: opt < %s -mem2reg -disable-output
+; RUN: opt < %s -passes=mem2reg -disable-output
;
define i32 @test() {
diff --git a/llvm/test/Transforms/Mem2Reg/2003-04-24-MultipleIdenticalSuccessors.ll b/llvm/test/Transforms/Mem2Reg/2003-04-24-MultipleIdenticalSuccessors.ll
index a013ff401f6c3..0b684d4f643d1 100644
--- a/llvm/test/Transforms/Mem2Reg/2003-04-24-MultipleIdenticalSuccessors.ll
+++ b/llvm/test/Transforms/Mem2Reg/2003-04-24-MultipleIdenticalSuccessors.ll
@@ -1,7 +1,7 @@
; Mem2reg used to only add one incoming value to a PHI node, even if it had
; multiple incoming edges from a block.
;
-; RUN: opt < %s -mem2reg -disable-output
+; RUN: opt < %s -passes=mem2reg -disable-output
define i32 @test(i1 %c1, i1 %c2) {
%X = alloca i32 ; <i32*> [#uses=2]
diff --git a/llvm/test/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll b/llvm/test/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll
index de7280e4d8e31..c4bc0f5849768 100644
--- a/llvm/test/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll
+++ b/llvm/test/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll
@@ -1,5 +1,5 @@
; Promoting some values allows promotion of other values.
-; RUN: opt < %s -mem2reg -S | not grep alloca
+; RUN: opt < %s -passes=mem2reg -S | not grep alloca
define i32 @test2() {
%result = alloca i32 ; <i32*> [#uses=2]
diff --git a/llvm/test/Transforms/Mem2Reg/2003-10-05-DeadPHIInsertion.ll b/llvm/test/Transforms/Mem2Reg/2003-10-05-DeadPHIInsertion.ll
index 8d55a1d0fa109..2fa052137c45c 100644
--- a/llvm/test/Transforms/Mem2Reg/2003-10-05-DeadPHIInsertion.ll
+++ b/llvm/test/Transforms/Mem2Reg/2003-10-05-DeadPHIInsertion.ll
@@ -1,7 +1,7 @@
; Mem2reg should not insert dead PHI nodes! The naive algorithm inserts a PHI
; node in L3, even though there is no load of %A in anything dominated by L3.
-; RUN: opt < %s -mem2reg -S | not grep phi
+; RUN: opt < %s -passes=mem2reg -S | not grep phi
define void @test(i32 %B, i1 %C) {
%A = alloca i32 ; <i32*> [#uses=4]
diff --git a/llvm/test/Transforms/Mem2Reg/2005-06-30-ReadBeforeWrite.ll b/llvm/test/Transforms/Mem2Reg/2005-06-30-ReadBeforeWrite.ll
index f0f1fdc7ee2b0..d0f8dc60d392f 100644
--- a/llvm/test/Transforms/Mem2Reg/2005-06-30-ReadBeforeWrite.ll
+++ b/llvm/test/Transforms/Mem2Reg/2005-06-30-ReadBeforeWrite.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -mem2reg -instcombine -S | grep store
+; RUN: opt < %s -passes='mem2reg,instcombine' -S | grep store
; PR590
diff --git a/llvm/test/Transforms/Mem2Reg/2005-11-28-Crash.ll b/llvm/test/Transforms/Mem2Reg/2005-11-28-Crash.ll
index 4b1d7f6651f39..e8d68914c3728 100644
--- a/llvm/test/Transforms/Mem2Reg/2005-11-28-Crash.ll
+++ b/llvm/test/Transforms/Mem2Reg/2005-11-28-Crash.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -mem2reg -disable-output
+; RUN: opt < %s -passes=mem2reg -disable-output
; PR670
define void @printk(i32, ...) {
diff --git a/llvm/test/Transforms/Mem2Reg/ConvertDebugInfo.ll b/llvm/test/Transforms/Mem2Reg/ConvertDebugInfo.ll
index e83c8226a88e2..31a5c581271b5 100644
--- a/llvm/test/Transforms/Mem2Reg/ConvertDebugInfo.ll
+++ b/llvm/test/Transforms/Mem2Reg/ConvertDebugInfo.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -mem2reg -S | FileCheck %s
+; RUN: opt < %s -passes=mem2reg -S | FileCheck %s
define double @testfunc(i32 %i, double %j) nounwind ssp !dbg !1 {
entry:
diff --git a/llvm/test/Transforms/Mem2Reg/ConvertDebugInfo2.ll b/llvm/test/Transforms/Mem2Reg/ConvertDebugInfo2.ll
index e2dd0e15f8177..2f7816a3109f3 100644
--- a/llvm/test/Transforms/Mem2Reg/ConvertDebugInfo2.ll
+++ b/llvm/test/Transforms/Mem2Reg/ConvertDebugInfo2.ll
@@ -1,4 +1,4 @@
-; RUN: opt -S -mem2reg <%s | FileCheck %s
+; RUN: opt -S -passes=mem2reg <%s | FileCheck %s
declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
diff --git a/llvm/test/Transforms/Mem2Reg/PromoteMemToRegister.ll b/llvm/test/Transforms/Mem2Reg/PromoteMemToRegister.ll
index 202b206d74989..804956219445e 100644
--- a/llvm/test/Transforms/Mem2Reg/PromoteMemToRegister.ll
+++ b/llvm/test/Transforms/Mem2Reg/PromoteMemToRegister.ll
@@ -1,5 +1,5 @@
; Simple sanity check testcase. Both alloca's should be eliminated.
-; RUN: opt < %s -debugify -mem2reg -check-debugify -S 2>&1 | FileCheck %s
+; RUN: opt < %s -passes='debugify,mem2reg,check-debugify' -S 2>&1 | FileCheck %s
; CHECK-NOT: alloca
; CHECK: CheckModuleDebugify: PASS
diff --git a/llvm/test/Transforms/Mem2Reg/UndefValuesMerge.ll b/llvm/test/Transforms/Mem2Reg/UndefValuesMerge.ll
index eeeb72f8e5a42..75bbcd20e2bd3 100644
--- a/llvm/test/Transforms/Mem2Reg/UndefValuesMerge.ll
+++ b/llvm/test/Transforms/Mem2Reg/UndefValuesMerge.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -mem2reg -S | not grep phi
+; RUN: opt < %s -passes=mem2reg -S | not grep phi
define i32 @testfunc(i1 %C, i32 %i, i8 %j) {
%I = alloca i32 ; <i32*> [#uses=2]
diff --git a/llvm/test/Transforms/Mem2Reg/alloca_addrspace.ll b/llvm/test/Transforms/Mem2Reg/alloca_addrspace.ll
index 95db828fd117e..f5fc425c126d3 100644
--- a/llvm/test/Transforms/Mem2Reg/alloca_addrspace.ll
+++ b/llvm/test/Transforms/Mem2Reg/alloca_addrspace.ll
@@ -1,5 +1,4 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -mem2reg -S | FileCheck %s
; RUN: opt < %s -passes=mem2reg -S | FileCheck %s
; Do not crash ;)
diff --git a/llvm/test/Transforms/Mem2Reg/atomic.ll b/llvm/test/Transforms/Mem2Reg/atomic.ll
index f20043d9716a8..de9414b35c777 100644
--- a/llvm/test/Transforms/Mem2Reg/atomic.ll
+++ b/llvm/test/Transforms/Mem2Reg/atomic.ll
@@ -1,4 +1,4 @@
-; RUN: opt -mem2reg < %s -S | FileCheck %s
+; RUN: opt -passes=mem2reg < %s -S | FileCheck %s
; mem2reg is allowed with arbitrary atomic operations (although we only support
; it for atomic load and store at the moment).
diff --git a/llvm/test/Transforms/Mem2Reg/crash.ll b/llvm/test/Transforms/Mem2Reg/crash.ll
index d7ed1dd13e811..efcf3df96eb7a 100644
--- a/llvm/test/Transforms/Mem2Reg/crash.ll
+++ b/llvm/test/Transforms/Mem2Reg/crash.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -mem2reg -S
+; RUN: opt < %s -passes=mem2reg -S
; PR5023
declare i32 @test1f()
diff --git a/llvm/test/Transforms/Mem2Reg/dbg-addr-inline-dse.ll b/llvm/test/Transforms/Mem2Reg/dbg-addr-inline-dse.ll
index c29e03b19e5fe..ee276c944eb97 100644
--- a/llvm/test/Transforms/Mem2Reg/dbg-addr-inline-dse.ll
+++ b/llvm/test/Transforms/Mem2Reg/dbg-addr-inline-dse.ll
@@ -1,4 +1,4 @@
-; RUN: opt -mem2reg -S < %s | FileCheck %s -implicit-check-not="call void @llvm.dbg.addr"
+; RUN: opt -passes=mem2reg -S < %s | FileCheck %s -implicit-check-not="call void @llvm.dbg.addr"
; This example is intended to simulate this pass pipeline, which may not exist
; in practice:
diff --git a/llvm/test/Transforms/Mem2Reg/dbg-addr.ll b/llvm/test/Transforms/Mem2Reg/dbg-addr.ll
index aaaeedcd12e33..eb9ed80264466 100644
--- a/llvm/test/Transforms/Mem2Reg/dbg-addr.ll
+++ b/llvm/test/Transforms/Mem2Reg/dbg-addr.ll
@@ -1,4 +1,4 @@
-; RUN: opt -mem2reg -S < %s | FileCheck %s
+; RUN: opt -passes=mem2reg -S < %s | FileCheck %s
; ModuleID = 'newvars.c'
source_filename = "newvars.c"
diff --git a/llvm/test/Transforms/Mem2Reg/dbg-inline-scope-for-phi.ll b/llvm/test/Transforms/Mem2Reg/dbg-inline-scope-for-phi.ll
index 6f4c33b9e5f31..ff49f5634f56a 100644
--- a/llvm/test/Transforms/Mem2Reg/dbg-inline-scope-for-phi.ll
+++ b/llvm/test/Transforms/Mem2Reg/dbg-inline-scope-for-phi.ll
@@ -1,4 +1,4 @@
-; RUN: opt -S < %s -mem2reg -verify | FileCheck %s
+; RUN: opt -S < %s -passes='function(mem2reg),require<verify>' | FileCheck %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.13.0"
diff --git a/llvm/test/Transforms/Mem2Reg/debug-alloca-phi-2.ll b/llvm/test/Transforms/Mem2Reg/debug-alloca-phi-2.ll
index 82144cb228e64..1869a75d0dd09 100644
--- a/llvm/test/Transforms/Mem2Reg/debug-alloca-phi-2.ll
+++ b/llvm/test/Transforms/Mem2Reg/debug-alloca-phi-2.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -mem2reg -S | FileCheck %s
+; RUN: opt < %s -passes=mem2reg -S | FileCheck %s
source_filename = "bugpoint-output.bc"
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.12.0"
diff --git a/llvm/test/Transforms/Mem2Reg/debug-alloca-phi.ll b/llvm/test/Transforms/Mem2Reg/debug-alloca-phi.ll
index 23365f75d9b8c..f80ee948da28f 100644
--- a/llvm/test/Transforms/Mem2Reg/debug-alloca-phi.ll
+++ b/llvm/test/Transforms/Mem2Reg/debug-alloca-phi.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -mem2reg -S | FileCheck %s
+; RUN: opt < %s -passes=mem2reg -S | FileCheck %s
source_filename = "bugpoint-output.bc"
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.12.0"
diff --git a/llvm/test/Transforms/Mem2Reg/debug-alloca-vla-1.ll b/llvm/test/Transforms/Mem2Reg/debug-alloca-vla-1.ll
index 283c27e7b2985..eec9955b17283 100644
--- a/llvm/test/Transforms/Mem2Reg/debug-alloca-vla-1.ll
+++ b/llvm/test/Transforms/Mem2Reg/debug-alloca-vla-1.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -mem2reg -S | FileCheck %s
+; RUN: opt < %s -passes=mem2reg -S | FileCheck %s
; Testing conversion from dbg.declare to dbg.value when the variable is a VLA.
;
diff --git a/llvm/test/Transforms/Mem2Reg/debug-alloca-vla-2.ll b/llvm/test/Transforms/Mem2Reg/debug-alloca-vla-2.ll
index 8b2bc128b0f97..2ae35e6938fe7 100644
--- a/llvm/test/Transforms/Mem2Reg/debug-alloca-vla-2.ll
+++ b/llvm/test/Transforms/Mem2Reg/debug-alloca-vla-2.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -mem2reg -S | FileCheck %s
+; RUN: opt < %s -passes=mem2reg -S | FileCheck %s
; Testing conversion from dbg.declare to dbg.value when the variable is a VLA.
;
diff --git a/llvm/test/Transforms/Mem2Reg/ignore-droppable.ll b/llvm/test/Transforms/Mem2Reg/ignore-droppable.ll
index ecad226e1d0f0..d9a7aa7b97f22 100644
--- a/llvm/test/Transforms/Mem2Reg/ignore-droppable.ll
+++ b/llvm/test/Transforms/Mem2Reg/ignore-droppable.ll
@@ -1,5 +1,4 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -mem2reg -S -o - < %s | FileCheck %s
; RUN: opt -passes=mem2reg -S -o - < %s | FileCheck %s
declare void @llvm.assume(i1)
diff --git a/llvm/test/Transforms/Mem2Reg/ignore-lifetime.ll b/llvm/test/Transforms/Mem2Reg/ignore-lifetime.ll
index b996a659237a7..7a3c8fc2b033a 100644
--- a/llvm/test/Transforms/Mem2Reg/ignore-lifetime.ll
+++ b/llvm/test/Transforms/Mem2Reg/ignore-lifetime.ll
@@ -1,4 +1,4 @@
-; RUN: opt -mem2reg -S -o - < %s | FileCheck %s
+; RUN: opt -passes=mem2reg -S -o - < %s | FileCheck %s
declare void @llvm.lifetime.start.p0i8(i64 %size, i8* nocapture %ptr)
declare void @llvm.lifetime.end.p0i8(i64 %size, i8* nocapture %ptr)
diff --git a/llvm/test/Transforms/Mem2Reg/optnone.ll b/llvm/test/Transforms/Mem2Reg/optnone.ll
index 41ee77aff79df..be39ffd0016d6 100644
--- a/llvm/test/Transforms/Mem2Reg/optnone.ll
+++ b/llvm/test/Transforms/Mem2Reg/optnone.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -mem2reg -S | FileCheck %s
+; RUN: opt < %s -passes=mem2reg -S | FileCheck %s
; This function is optnone, so the allocas should not be eliminated.
diff --git a/llvm/test/Transforms/Mem2Reg/pr24179.ll b/llvm/test/Transforms/Mem2Reg/pr24179.ll
index 8df27c86a59ec..cc780e8bf3cb7 100644
--- a/llvm/test/Transforms/Mem2Reg/pr24179.ll
+++ b/llvm/test/Transforms/Mem2Reg/pr24179.ll
@@ -1,5 +1,4 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -mem2reg < %s -S | FileCheck %s
; RUN: opt -passes=mem2reg < %s -S | FileCheck %s
declare i32 @def(i32)
diff --git a/llvm/test/Transforms/Mem2Reg/pr37632-unreachable-list-of-stores.ll b/llvm/test/Transforms/Mem2Reg/pr37632-unreachable-list-of-stores.ll
index e744d80440789..5ddb658d3b1ae 100644
--- a/llvm/test/Transforms/Mem2Reg/pr37632-unreachable-list-of-stores.ll
+++ b/llvm/test/Transforms/Mem2Reg/pr37632-unreachable-list-of-stores.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -mem2reg < %s -S | FileCheck %s
+; RUN: opt -passes=mem2reg < %s -S | FileCheck %s
define void @patatino() {
; CHECK-LABEL: @patatino(
diff --git a/llvm/test/Transforms/Mem2Reg/preserve-nonnull-load-metadata.ll b/llvm/test/Transforms/Mem2Reg/preserve-nonnull-load-metadata.ll
index 33a5b124c555f..5a8f0e8c93f97 100644
--- a/llvm/test/Transforms/Mem2Reg/preserve-nonnull-load-metadata.ll
+++ b/llvm/test/Transforms/Mem2Reg/preserve-nonnull-load-metadata.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -mem2reg -S | FileCheck %s
+; RUN: opt < %s -passes=mem2reg -S | FileCheck %s
; This tests that mem2reg preserves the !nonnull metadata on loads
; from allocas that get optimized out.
diff --git a/llvm/test/Transforms/Mem2Reg/undef-order.ll b/llvm/test/Transforms/Mem2Reg/undef-order.ll
index 7642456a9da44..b579ffec4a908 100644
--- a/llvm/test/Transforms/Mem2Reg/undef-order.ll
+++ b/llvm/test/Transforms/Mem2Reg/undef-order.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-;RUN: opt -mem2reg -S < %s | FileCheck %s
+;RUN: opt -passes=mem2reg -S < %s | FileCheck %s
declare i1 @cond()
More information about the llvm-commits
mailing list