From 72482c5167247f74592e9642fe2dbee9eb0e7297 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Thu, 8 Dec 2022 02:27:27 +0300 Subject: [PATCH] [NFC] Port all LoopFlatten tests to `-passes=` syntax --- llvm/test/Transforms/LoopFlatten/limit-not-invariant.ll | 2 +- llvm/test/Transforms/LoopFlatten/loop-flatten-negative.ll | 8 ++++---- llvm/test/Transforms/LoopFlatten/loop-flatten-simplify-cfg.ll | 2 +- llvm/test/Transforms/LoopFlatten/loop-flatten.ll | 2 +- llvm/test/Transforms/LoopFlatten/pr40581.ll | 4 ++-- llvm/test/Transforms/LoopFlatten/pr49571.ll | 2 +- llvm/test/Transforms/LoopFlatten/pr58865.ll | 2 +- llvm/test/Transforms/LoopFlatten/pr59339.ll | 2 +- llvm/test/Transforms/LoopFlatten/widen-iv.ll | 8 ++++---- llvm/test/Transforms/LoopFlatten/widen-iv2.ll | 4 ++-- llvm/test/Transforms/LoopFlatten/widen-iv3.ll | 4 ++-- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/llvm/test/Transforms/LoopFlatten/limit-not-invariant.ll b/llvm/test/Transforms/LoopFlatten/limit-not-invariant.ll index 171d0f4..7aa9e65 100644 --- a/llvm/test/Transforms/LoopFlatten/limit-not-invariant.ll +++ b/llvm/test/Transforms/LoopFlatten/limit-not-invariant.ll @@ -1,6 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -S -loop-flatten -verify-loop-info -verify-dom-info -verify-scev -verify | FileCheck %s +; RUN: opt < %s -S -passes='loop(loop-flatten),verify' -verify-loop-info -verify-dom-info -verify-scev | FileCheck %s target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" diff --git a/llvm/test/Transforms/LoopFlatten/loop-flatten-negative.ll b/llvm/test/Transforms/LoopFlatten/loop-flatten-negative.ll index 4bf3129..5a39c05 100644 --- a/llvm/test/Transforms/LoopFlatten/loop-flatten-negative.ll +++ b/llvm/test/Transforms/LoopFlatten/loop-flatten-negative.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -S -loop-flatten -debug-only=loop-flatten 2>&1 | FileCheck %s +; RUN: opt < %s -S -passes=loop-flatten -debug-only=loop-flatten 2>&1 | FileCheck %s ; REQUIRES: asserts target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" @@ -434,7 +434,7 @@ while.body3: while.end.loopexit: %inc.lcssa = phi i32 [ %inc, %while.body3 ] br label %while.end - + while.end: %j.1 = phi i32 [ %j.017, %while.cond1.preheader], [ %inc.lcssa, %while.end.loopexit ] %inc4 = add i32 %i.016, 1 @@ -760,7 +760,7 @@ for.body7: define void @invalid_tripCount(i8* %a, i32 %b, i32 %c, i32 %initial-mutations, i32 %statemutations) { entry: %iszero = icmp eq i32 %b, 0 - br i1 %iszero, label %for.empty, label %for.loopinit + br i1 %iszero, label %for.empty, label %for.loopinit for.loopinit: br label %for.loopbody.outer for.loopbody.outer: @@ -784,7 +784,7 @@ for.empty.loopexit: br label %for.empty for.empty: ret void -} +} ; GEP doesn't dominate the loop latch so can't guarantee N*M won't overflow. @first = global i32 1, align 4 diff --git a/llvm/test/Transforms/LoopFlatten/loop-flatten-simplify-cfg.ll b/llvm/test/Transforms/LoopFlatten/loop-flatten-simplify-cfg.ll index 89487cd..2112824 100644 --- a/llvm/test/Transforms/LoopFlatten/loop-flatten-simplify-cfg.ll +++ b/llvm/test/Transforms/LoopFlatten/loop-flatten-simplify-cfg.ll @@ -1,7 +1,7 @@ ;; This test was created to ensure that the LoopFlatten pass can ;; operate on loops that are not in simplified form before applying the pass. -; RUN: opt < %s -S -loop-flatten -simplifycfg -verify-loop-info -verify-dom-info -verify-scev -verify | FileCheck %s +; RUN: opt < %s -S -passes='loop(loop-flatten),simplifycfg,verify' -verify-loop-info -verify-dom-info -verify-scev | FileCheck %s target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" diff --git a/llvm/test/Transforms/LoopFlatten/loop-flatten.ll b/llvm/test/Transforms/LoopFlatten/loop-flatten.ll index 73f50c0..1a92863 100644 --- a/llvm/test/Transforms/LoopFlatten/loop-flatten.ll +++ b/llvm/test/Transforms/LoopFlatten/loop-flatten.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -S -loop-flatten -verify-loop-info -verify-dom-info -verify-scev -verify | FileCheck %s +; RUN: opt < %s -S -passes='loop(loop-flatten),verify' -verify-loop-info -verify-dom-info -verify-scev | FileCheck %s target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" diff --git a/llvm/test/Transforms/LoopFlatten/pr40581.ll b/llvm/test/Transforms/LoopFlatten/pr40581.ll index 0ee956a..b38494e 100644 --- a/llvm/test/Transforms/LoopFlatten/pr40581.ll +++ b/llvm/test/Transforms/LoopFlatten/pr40581.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -S -loop-flatten -verify-loop-info -verify-dom-info -verify-scev -verify | FileCheck %s +; RUN: opt < %s -S -passes='loop(loop-flatten),verify' -verify-loop-info -verify-dom-info -verify-scev | FileCheck %s target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" @@ -11,7 +11,7 @@ target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" ; k++; ; } ; -; TODO: this case doesn't trigger yet. +; TODO: this case doesn't trigger yet. ; define dso_local void @v0(i32 %n, i32* nocapture %A, i32* nocapture readonly %B) local_unnamed_addr #0 { ; diff --git a/llvm/test/Transforms/LoopFlatten/pr49571.ll b/llvm/test/Transforms/LoopFlatten/pr49571.ll index 0037064..b5d9b2e 100644 --- a/llvm/test/Transforms/LoopFlatten/pr49571.ll +++ b/llvm/test/Transforms/LoopFlatten/pr49571.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -S -loop-flatten -verify-loop-info -verify-dom-info -verify-scev -verify | FileCheck %s +; RUN: opt < %s -S -passes='loop(loop-flatten),verify' -verify-loop-info -verify-dom-info -verify-scev | FileCheck %s ; Testcase of PR49571 ; Previously we had an assertion that the incoming value from the diff --git a/llvm/test/Transforms/LoopFlatten/pr58865.ll b/llvm/test/Transforms/LoopFlatten/pr58865.ll index 984fd1f..9b5eb2f 100644 --- a/llvm/test/Transforms/LoopFlatten/pr58865.ll +++ b/llvm/test/Transforms/LoopFlatten/pr58865.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -loop-flatten -verify-scev -S < %s | FileCheck %s +; RUN: opt -passes=loop-flatten -verify-scev -S < %s | FileCheck %s ; define void @sum_2d(ptr %p) { ; CHECK-LABEL: @sum_2d( diff --git a/llvm/test/Transforms/LoopFlatten/pr59339.ll b/llvm/test/Transforms/LoopFlatten/pr59339.ll index 52ce4ba..a795e54 100644 --- a/llvm/test/Transforms/LoopFlatten/pr59339.ll +++ b/llvm/test/Transforms/LoopFlatten/pr59339.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -S -opaque-pointers -loop-flatten -verify-loop-info -verify-dom-info -verify-scev -verify | FileCheck %s +; RUN: opt < %s -S -opaque-pointers -passes='loop(loop-flatten),verify' -verify-loop-info -verify-dom-info -verify-scev | FileCheck %s ; FIXME: This incorrectly triggers, thus resulting in a miscompilation. ; The problem is that there is a linear use of the induction variable, i*3+j, diff --git a/llvm/test/Transforms/LoopFlatten/widen-iv.ll b/llvm/test/Transforms/LoopFlatten/widen-iv.ll index 282c6a7..f679ba2 100644 --- a/llvm/test/Transforms/LoopFlatten/widen-iv.ll +++ b/llvm/test/Transforms/LoopFlatten/widen-iv.ll @@ -1,12 +1,12 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -S -loop-simplify -loop-flatten -loop-flatten-widen-iv=true \ -; RUN: -verify-loop-info -verify-dom-info -verify-scev -verify \ +; RUN: opt < %s -S -passes='loop-simplify,loop(loop-flatten),verify' -loop-flatten-widen-iv=true \ +; RUN: -verify-loop-info -verify-dom-info -verify-scev \ ; RUN: -loop-flatten-cost-threshold=6 | \ ; RUN: FileCheck %s --check-prefix=CHECK -; RUN: opt < %s -S -loop-simplify -loop-flatten -loop-flatten-widen-iv=false \ -; RUN: -verify-loop-info -verify-dom-info -verify-scev -verify | \ +; RUN: opt < %s -S -passes='loop-simplify,loop(loop-flatten),verify' -loop-flatten-widen-iv=false \ +; RUN: -verify-loop-info -verify-dom-info -verify-scev | \ ; RUN: FileCheck %s --check-prefix=DONTWIDEN target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" diff --git a/llvm/test/Transforms/LoopFlatten/widen-iv2.ll b/llvm/test/Transforms/LoopFlatten/widen-iv2.ll index 9bb36d0..bd937b1 100644 --- a/llvm/test/Transforms/LoopFlatten/widen-iv2.ll +++ b/llvm/test/Transforms/LoopFlatten/widen-iv2.ll @@ -3,8 +3,8 @@ ; This checks updating of phi nodes when the transformation is deemed ; unprofitable after IV widening. -; RUN: opt < %s -S -loop-flatten \ -; RUN: -verify-loop-info -verify-dom-info -verify-scev -verify | \ +; RUN: opt < %s -S -passes='loop(loop-flatten),verify' \ +; RUN: -verify-loop-info -verify-dom-info -verify-scev | \ ; RUN: FileCheck %s --check-prefix=CHECK target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" diff --git a/llvm/test/Transforms/LoopFlatten/widen-iv3.ll b/llvm/test/Transforms/LoopFlatten/widen-iv3.ll index b0e2e19..a67a1ac 100644 --- a/llvm/test/Transforms/LoopFlatten/widen-iv3.ll +++ b/llvm/test/Transforms/LoopFlatten/widen-iv3.ll @@ -1,7 +1,7 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -S -loop-flatten \ -; RUN: -verify-loop-info -verify-dom-info -verify-scev -verify | \ +; RUN: opt < %s -S -passes='loop(loop-flatten),verify' \ +; RUN: -verify-loop-info -verify-dom-info -verify-scev | \ ; RUN: FileCheck %s --check-prefix=CHECK target datalayout = "n32" -- 2.7.4