From 1db2551cc1a356a67c0967f424d6158e2ea127e3 Mon Sep 17 00:00:00 2001 From: Bjorn Pettersson Date: Thu, 8 Jul 2021 14:12:19 +0200 Subject: [PATCH] [NewPM] Rename 'unswitch' to 'simple-loop-unswitch' in PassRegistry It is confusing to have two ways of specifying the same pass ('simple-loop-unswitch' and 'unswitch'). This patch replaces 'unswitch' by 'simple-loop-unswitch' to get a unique identifier. Using 'simple-loop-unswitch' instead of 'unswitch' also has the advantage of matching how the pass is named in DEBUG_TYPE etc. So this makes it a bit more consistent how we refer to the pass in options such as -passes, -print-after and -debug-only. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D105628 --- llvm/lib/Passes/PassRegistry.def | 3 +-- .../Analysis/MemorySSA/update-remove-dead-blocks.ll | 2 +- llvm/test/Other/print-before-after.ll | 14 +++++--------- llvm/test/Other/print-passes.ll | 2 +- .../SimpleLoopUnswitch/basictest-profmd.ll | 4 ++-- llvm/test/Transforms/SimpleLoopUnswitch/basictest.ll | 4 ++-- .../dead-blocks-uses-in-unreachablel-blocks.ll | 2 +- .../SimpleLoopUnswitch/delete-dead-blocks.ll | 4 ++-- .../SimpleLoopUnswitch/endless-unswitch.ll | 2 +- .../exponential-nontrivial-unswitch-nested.ll | 20 ++++++++++---------- .../exponential-nontrivial-unswitch-nested2.ll | 20 ++++++++++---------- .../exponential-nontrivial-unswitch.ll | 20 ++++++++++---------- .../exponential-nontrivial-unswitch2.ll | 20 ++++++++++---------- .../exponential-switch-unswitch.ll | 20 ++++++++++---------- llvm/test/Transforms/SimpleLoopUnswitch/guards.ll | 4 ++-- .../SimpleLoopUnswitch/implicit-null-checks.ll | 2 +- llvm/test/Transforms/SimpleLoopUnswitch/msan.ll | 4 ++-- .../SimpleLoopUnswitch/nontrivial-unswitch-cost.ll | 4 ++-- .../nontrivial-unswitch-redundant-switch.ll | 4 ++-- .../SimpleLoopUnswitch/nontrivial-unswitch.ll | 4 ++-- .../SimpleLoopUnswitch/not-safe-to-clone.ll | 2 +- .../partial-unswitch-mssa-threshold.ll | 4 ++-- .../partial-unswitch-update-memoryssa.ll | 4 ++-- .../SimpleLoopUnswitch/partial-unswitch.ll | 2 +- .../SimpleLoopUnswitch/trivial-unswitch-iteration.ll | 4 ++-- .../SimpleLoopUnswitch/trivial-unswitch-profmd.ll | 4 ++-- .../SimpleLoopUnswitch/trivial-unswitch.ll | 4 ++-- .../Transforms/SimpleLoopUnswitch/update-scev.ll | 4 ++-- 28 files changed, 91 insertions(+), 96 deletions(-) diff --git a/llvm/lib/Passes/PassRegistry.def b/llvm/lib/Passes/PassRegistry.def index f7bb2bc..21a3c19 100644 --- a/llvm/lib/Passes/PassRegistry.def +++ b/llvm/lib/Passes/PassRegistry.def @@ -436,7 +436,6 @@ LOOP_PASS("print", LoopCachePrinterPass(dbgs())) LOOP_PASS("loop-predication", LoopPredicationPass()) LOOP_PASS("guard-widening", GuardWideningPass()) LOOP_PASS("loop-bound-split", LoopBoundSplitPass()) -LOOP_PASS("simple-loop-unswitch", SimpleLoopUnswitchPass()) LOOP_PASS("loop-reroll", LoopRerollPass()) LOOP_PASS("loop-versioning-licm", LoopVersioningLICMPass()) #undef LOOP_PASS @@ -444,7 +443,7 @@ LOOP_PASS("loop-versioning-licm", LoopVersioningLICMPass()) #ifndef LOOP_PASS_WITH_PARAMS #define LOOP_PASS_WITH_PARAMS(NAME, CLASS, CREATE_PASS, PARSER, PARAMS) #endif -LOOP_PASS_WITH_PARAMS("unswitch", +LOOP_PASS_WITH_PARAMS("simple-loop-unswitch", "SimpleLoopUnswitchPass", [](bool NonTrivial) { return SimpleLoopUnswitchPass(NonTrivial); diff --git a/llvm/test/Analysis/MemorySSA/update-remove-dead-blocks.ll b/llvm/test/Analysis/MemorySSA/update-remove-dead-blocks.ll index 6f07b2a..5bcc179 100644 --- a/llvm/test/Analysis/MemorySSA/update-remove-dead-blocks.ll +++ b/llvm/test/Analysis/MemorySSA/update-remove-dead-blocks.ll @@ -1,7 +1,7 @@ ; RUN: opt -loop-unswitch -loop-reduce -loop-simplifycfg -verify-memoryssa -S %s | FileCheck %s ; TODO: also run with NPM, but currently LSR does not preserve LCSSA, causing a verification failure on the test. -; opt -passes='loop-mssa(unswitch,loop-reduce,simplifycfg)' -verify-memoryssa -S %s | FileCheck %s +; opt -passes='loop-mssa(simple-loop-unswitch,loop-reduce,simplifycfg)' -verify-memoryssa -S %s | FileCheck %s ; Test case for PR47557. diff --git a/llvm/test/Other/print-before-after.ll b/llvm/test/Other/print-before-after.ll index b4287a1..583c576 100644 --- a/llvm/test/Other/print-before-after.ll +++ b/llvm/test/Other/print-before-after.ll @@ -9,7 +9,7 @@ ; RUN: opt < %s -disable-output -passes='no-op-module,no-op-function' -print-before=no-op-function --print-module-scope 2>&1 | FileCheck %s --check-prefix=TWICE ; RUN: opt < %s -disable-output -passes='no-op-module,no-op-function' -print-after=no-op-function --print-module-scope 2>&1 | FileCheck %s --check-prefix=TWICE ; RUN: opt < %s -disable-output -passes='loop-vectorize' -print-before=loop-vectorize -print-after=loop-vectorize 2>&1 | FileCheck %s --check-prefix=CHECK-LV --allow-empty -; RUN: opt < %s -disable-output -passes='simple-loop-unswitch,unswitch' -print-before=unswitch -print-after=simple-loop-unswitch 2>&1 | FileCheck %s --check-prefix=CHECK-UNSWITCH --allow-empty +; RUN: opt < %s -disable-output -passes='simple-loop-unswitch,simple-loop-unswitch,simple-loop-unswitch' -print-before=simple-loop-unswitch -print-after=simple-loop-unswitch 2>&1 | FileCheck %s --check-prefix=CHECK-UNSWITCH --allow-empty ; NONE-NOT: @foo ; NONE-NOT: @bar @@ -33,15 +33,11 @@ ; CHECK-LV: *** IR Dump After LoopVectorizePass on bar *** ; Verify that we can handle loop passes with params. - -; FIXME: The SimpleLoopUnswitchPass is extra complicated as we have different -; pass names mapping to the same class name. But we currently only use a 1-1 -; mapping, so we do not get the -print-before=unswitch printout here. So the -; NOT checks below is currently verifying the "faulty" behavior and we -; actually want to get those printout here in the future. -; CHECK-UNSWITCH-NOT: *** IR Dump Before SimpleLoopUnswitchPass on Loop at depth 1 containing +; CHECK-UNSWITCH: *** IR Dump Before SimpleLoopUnswitchPass on Loop at depth 1 containing +; CHECK-UNSWITCH: *** IR Dump After SimpleLoopUnswitchPass on Loop at depth 1 containing +; CHECK-UNSWITCH: *** IR Dump Before SimpleLoopUnswitchPass on Loop at depth 1 containing ; CHECK-UNSWITCH: *** IR Dump After SimpleLoopUnswitchPass on Loop at depth 1 containing -; CHECK-UNSWITCH-NOT: *** IR Dump Before SimpleLoopUnswitchPass on Loop at depth 1 containing +; CHECK-UNSWITCH: *** IR Dump Before SimpleLoopUnswitchPass on Loop at depth 1 containing ; CHECK-UNSWITCH: *** IR Dump After SimpleLoopUnswitchPass on Loop at depth 1 containing define void @foo() { diff --git a/llvm/test/Other/print-passes.ll b/llvm/test/Other/print-passes.ll index d208085..acaa65f 100644 --- a/llvm/test/Other/print-passes.ll +++ b/llvm/test/Other/print-passes.ll @@ -21,6 +21,6 @@ ; CHECK: Loop passes: ; CHECK: no-op-loop ; CHECK: Loop passes with params: -; CHECK: unswitch +; CHECK: simple-loop-unswitch ; CHECK: Loop analyses: ; CHECK: no-op-loop diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/basictest-profmd.ll b/llvm/test/Transforms/SimpleLoopUnswitch/basictest-profmd.ll index 858088b..88750a1 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/basictest-profmd.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/basictest-profmd.ll @@ -1,5 +1,5 @@ -; RUN: opt -passes='loop(unswitch),verify' -S < %s | FileCheck %s -; RUN: opt -verify-memoryssa -passes='loop-mssa(unswitch),verify' -S < %s | FileCheck %s +; RUN: opt -passes='loop(simple-loop-unswitch),verify' -S < %s | FileCheck %s +; RUN: opt -verify-memoryssa -passes='loop-mssa(simple-loop-unswitch),verify' -S < %s | FileCheck %s declare void @incf() declare void @decf() diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/basictest.ll b/llvm/test/Transforms/SimpleLoopUnswitch/basictest.ll index 95e6f67..f2e4973 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/basictest.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/basictest.ll @@ -1,5 +1,5 @@ -; RUN: opt -passes='loop(unswitch),verify' -S < %s | FileCheck %s -; RUN: opt -verify-memoryssa -passes='loop-mssa(unswitch),verify' -S < %s | FileCheck %s +; RUN: opt -passes='loop(simple-loop-unswitch),verify' -S < %s | FileCheck %s +; RUN: opt -verify-memoryssa -passes='loop-mssa(simple-loop-unswitch),verify' -S < %s | FileCheck %s define i32 @test(i32* %A, i1 %C) { entry: diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/dead-blocks-uses-in-unreachablel-blocks.ll b/llvm/test/Transforms/SimpleLoopUnswitch/dead-blocks-uses-in-unreachablel-blocks.ll index 2756e10..42b1a74 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/dead-blocks-uses-in-unreachablel-blocks.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/dead-blocks-uses-in-unreachablel-blocks.ll @@ -1,5 +1,5 @@ ; REQUIRES: asserts -; RUN: opt < %s -passes='unswitch' -disable-output +; RUN: opt < %s -passes='simple-loop-unswitch' -disable-output ; RUN: opt < %s -simple-loop-unswitch -enable-nontrivial-unswitch -disable-output diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/delete-dead-blocks.ll b/llvm/test/Transforms/SimpleLoopUnswitch/delete-dead-blocks.ll index 5659250..bfbeb7e 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/delete-dead-blocks.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/delete-dead-blocks.ll @@ -1,6 +1,6 @@ ; RUN: opt < %s -simple-loop-unswitch -enable-nontrivial-unswitch -S 2>&1 | FileCheck %s -; RUN: opt < %s -passes='unswitch' -S 2>&1 | FileCheck %s -; RUN: opt < %s -passes='loop-mssa(unswitch)' -S 2>&1 | FileCheck %s +; RUN: opt < %s -passes='simple-loop-unswitch' -S 2>&1 | FileCheck %s +; RUN: opt < %s -passes='loop-mssa(simple-loop-unswitch)' -S 2>&1 | FileCheck %s ; ; Checking that (dead) blocks from inner loop are deleted after unswitch. ; diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/endless-unswitch.ll b/llvm/test/Transforms/SimpleLoopUnswitch/endless-unswitch.ll index ab049de..313748d 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/endless-unswitch.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/endless-unswitch.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -passes='loop-mssa(unswitch),loop-mssa(unswitch),verify' -S < %s | FileCheck %s +; RUN: opt -passes='loop-mssa(simple-loop-unswitch),loop-mssa(simple-loop-unswitch),verify' -S < %s | FileCheck %s ; Below bugs have caused endless unswitch. ; diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch-nested.ll b/llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch-nested.ll index d2ca063..a2cfbc9 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch-nested.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch-nested.ll @@ -4,19 +4,19 @@ ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=0 -unswitch-siblings-toplevel-div=1 \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=0 -unswitch-siblings-toplevel-div=16 \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=0 -unswitch-siblings-toplevel-div=1 \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=0 -unswitch-siblings-toplevel-div=16 \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; When we relax the candidates part of a multiplier formula ; (unscaled candidates == 4) we start getting some unswitches, @@ -24,12 +24,12 @@ ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=4 -unswitch-siblings-toplevel-div=1 \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | \ ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-UNSCALE4-DIV1 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=4 -unswitch-siblings-toplevel-div=1 \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | \ ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-UNSCALE4-DIV1 ; ; NB: sort -b is essential here and below, otherwise blanks might lead to different @@ -37,12 +37,12 @@ ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=4 -unswitch-siblings-toplevel-div=2 \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | \ ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-UNSCALE4-DIV2 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=4 -unswitch-siblings-toplevel-div=2 \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | \ ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-UNSCALE4-DIV2 ; ; Get @@ -50,11 +50,11 @@ ; loop nests when cost multiplier is disabled: ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=false \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | \ ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP32 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=false \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | \ ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP32 ; ; Single loop nest, not unswitched diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch-nested2.ll b/llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch-nested2.ll index e8879e7..583f663 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch-nested2.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch-nested2.ll @@ -9,19 +9,19 @@ ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=0 -unswitch-siblings-toplevel-div=1 \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=0 -unswitch-siblings-toplevel-div=16 \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=0 -unswitch-siblings-toplevel-div=1 \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=0 -unswitch-siblings-toplevel-div=16 \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; When we relax the candidates part of a multiplier formula ; When we relax the candidates part of a multiplier formula @@ -30,12 +30,12 @@ ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=3 -unswitch-siblings-toplevel-div=1 \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | \ ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-UNSCALE3-DIV1 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=3 -unswitch-siblings-toplevel-div=1 \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | \ ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-UNSCALE3-DIV1 ; ; NB: sort -b is essential here and below, otherwise blanks might lead to different @@ -43,22 +43,22 @@ ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=3 -unswitch-siblings-toplevel-div=2 \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | \ ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-UNSCALE3-DIV2 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=3 -unswitch-siblings-toplevel-div=2 \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | \ ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-UNSCALE3-DIV2 ; ; With disabled cost-multiplier we get maximal possible amount of unswitches. ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=false \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | \ ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-MAX ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=false \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | \ ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-MAX ; ; Single loop nest, not unswitched diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch.ll b/llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch.ll index 2644796..cdd02b6 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch.ll @@ -4,19 +4,19 @@ ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=0 -unswitch-siblings-toplevel-div=1 \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=0 -unswitch-siblings-toplevel-div=8 \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=0 -unswitch-siblings-toplevel-div=1 \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=0 -unswitch-siblings-toplevel-div=8 \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; With relaxed candidates multiplier (unscaled candidates == 8) we should allow ; some unswitches to happen until siblings multiplier starts kicking in: @@ -25,11 +25,11 @@ ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=8 -unswitch-siblings-toplevel-div=1 \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP5 +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP5 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=8 -unswitch-siblings-toplevel-div=1 \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP5 +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP5 ; ; With relaxed candidates multiplier (unscaled candidates == 8) and with relaxed ; siblings multiplier for top-level loops (toplevel-div == 8) we should get @@ -38,21 +38,21 @@ ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=8 -unswitch-siblings-toplevel-div=8 \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP32 +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP32 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=8 -unswitch-siblings-toplevel-div=8 \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP32 +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP32 ; ; Similarly get ; 2^(num conds) == 2^5 == 32 ; copies of the loop when cost multiplier is disabled: ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=false \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP32 +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP32 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=false \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP32 +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP32 ; ; Single loop, not unswitched ; LOOP1: Loop at depth 1 containing: diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch2.ll b/llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch2.ll index 636039b..e350864 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch2.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch2.ll @@ -6,42 +6,42 @@ ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=0 -unswitch-siblings-toplevel-div=1 \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=0 -unswitch-siblings-toplevel-div=8 \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=8 -unswitch-siblings-toplevel-div=1 \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=8 -unswitch-siblings-toplevel-div=8 \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=false \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=0 -unswitch-siblings-toplevel-div=1 \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=0 -unswitch-siblings-toplevel-div=8 \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=8 -unswitch-siblings-toplevel-div=1 \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=8 -unswitch-siblings-toplevel-div=8 \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=false \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; ; Single loop, not unswitched diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/exponential-switch-unswitch.ll b/llvm/test/Transforms/SimpleLoopUnswitch/exponential-switch-unswitch.ll index 35d431e..d008d20 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/exponential-switch-unswitch.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/exponential-switch-unswitch.ll @@ -11,31 +11,31 @@ ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=0 -unswitch-siblings-toplevel-div=1 \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=0 -unswitch-siblings-toplevel-div=16 \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=0 -unswitch-siblings-toplevel-div=1 \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=0 -unswitch-siblings-toplevel-div=16 \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | FileCheck %s --check-prefixes=LOOP1 ; ; With relaxed candidates multiplier (unscaled candidates == 8) we should allow ; some unswitches to happen until siblings multiplier starts kicking in: ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=8 -unswitch-siblings-toplevel-div=1 \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | \ ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-RELAX ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=8 -unswitch-siblings-toplevel-div=1 \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | \ ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-RELAX ; ; With relaxed candidates multiplier (unscaled candidates == 8) and with relaxed @@ -44,22 +44,22 @@ ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=8 -unswitch-siblings-toplevel-div=8 \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | \ ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-RELAX2 ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=8 -unswitch-siblings-toplevel-div=8 \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | \ ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-RELAX2 ; ; We get hundreds of copies of the loop when cost multiplier is disabled: ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=false \ -; RUN: -passes='loop(unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop(simple-loop-unswitch),print' -disable-output 2>&1 | \ ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-MAX ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=false \ -; RUN: -passes='loop-mssa(unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop-mssa(simple-loop-unswitch),print' -disable-output 2>&1 | \ ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-MAX ; Single loop nest, not unswitched diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/guards.ll b/llvm/test/Transforms/SimpleLoopUnswitch/guards.ll index de57075b..3cba209 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/guards.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/guards.ll @@ -1,6 +1,6 @@ -; RUN: opt -passes='loop(unswitch),verify' -simple-loop-unswitch-guards -S < %s | FileCheck %s +; RUN: opt -passes='loop(simple-loop-unswitch),verify' -simple-loop-unswitch-guards -S < %s | FileCheck %s ; RUN: opt -simple-loop-unswitch -enable-nontrivial-unswitch -simple-loop-unswitch-guards -S < %s | FileCheck %s -; RUN: opt -passes='loop-mssa(unswitch),verify' -simple-loop-unswitch-guards -verify-memoryssa -S < %s | FileCheck %s +; RUN: opt -passes='loop-mssa(simple-loop-unswitch),verify' -simple-loop-unswitch-guards -verify-memoryssa -S < %s | FileCheck %s declare void @llvm.experimental.guard(i1, ...) diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/implicit-null-checks.ll b/llvm/test/Transforms/SimpleLoopUnswitch/implicit-null-checks.ll index 002e57d..14a9733 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/implicit-null-checks.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/implicit-null-checks.ll @@ -1,6 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py ; RUN: opt -enable-nontrivial-unswitch=true -simple-loop-unswitch -S < %s | FileCheck %s -; RUN: opt -enable-nontrivial-unswitch=true -passes='loop(unswitch),verify' -S < %s | FileCheck %s +; RUN: opt -enable-nontrivial-unswitch=true -passes='loop(simple-loop-unswitch),verify' -S < %s | FileCheck %s declare void @may_exit() declare void @throw_npe() diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/msan.ll b/llvm/test/Transforms/SimpleLoopUnswitch/msan.ll index 0022b33..3f04bcd 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/msan.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/msan.ll @@ -1,5 +1,5 @@ -; RUN: opt -passes='loop(unswitch),verify' -S < %s | FileCheck %s -; RUN: opt -verify-memoryssa -passes='loop-mssa(unswitch),verify' -S < %s | FileCheck %s +; RUN: opt -passes='loop(simple-loop-unswitch),verify' -S < %s | FileCheck %s +; RUN: opt -verify-memoryssa -passes='loop-mssa(simple-loop-unswitch),verify' -S < %s | FileCheck %s declare void @unknown() declare void @unknown2() diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch-cost.ll b/llvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch-cost.ll index 692799d..56a86a0 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch-cost.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch-cost.ll @@ -1,7 +1,7 @@ ; Specifically exercise the cost modeling for non-trivial loop unswitching. ; -; RUN: opt -passes='loop(unswitch),verify' -unswitch-threshold=5 -S < %s | FileCheck %s -; RUN: opt -passes='loop-mssa(unswitch),verify' -unswitch-threshold=5 -S < %s | FileCheck %s +; RUN: opt -passes='loop(simple-loop-unswitch),verify' -unswitch-threshold=5 -S < %s | FileCheck %s +; RUN: opt -passes='loop-mssa(simple-loop-unswitch),verify' -unswitch-threshold=5 -S < %s | FileCheck %s ; RUN: opt -simple-loop-unswitch -enable-nontrivial-unswitch -unswitch-threshold=5 -S < %s | FileCheck %s ; RUN: opt -simple-loop-unswitch -enable-nontrivial-unswitch -unswitch-threshold=5 -enable-mssa-loop-dependency=true -verify-memoryssa -S < %s | FileCheck %s diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch-redundant-switch.ll b/llvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch-redundant-switch.ll index 6dd2cde..b28535c 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch-redundant-switch.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch-redundant-switch.ll @@ -1,6 +1,6 @@ ; REQUIRES: asserts -; RUN: opt -passes='unswitch' -disable-output -S < %s -; RUN: opt -passes='loop-mssa(unswitch)' -disable-output -S < %s +; RUN: opt -passes='simple-loop-unswitch' -disable-output -S < %s +; RUN: opt -passes='loop-mssa(simple-loop-unswitch)' -disable-output -S < %s ; RUN: opt -simple-loop-unswitch -enable-nontrivial-unswitch -disable-output -S < %s ; This loop shouldn't trigger asserts in SimpleLoopUnswitch. diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch.ll b/llvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch.ll index 58950835..d0963b7 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch.ll @@ -1,5 +1,5 @@ -; RUN: opt -passes='loop(unswitch),verify' -S < %s | FileCheck %s -; RUN: opt -passes='loop-mssa(unswitch),verify' -S < %s | FileCheck %s +; RUN: opt -passes='loop(simple-loop-unswitch),verify' -S < %s | FileCheck %s +; RUN: opt -passes='loop-mssa(simple-loop-unswitch),verify' -S < %s | FileCheck %s ; RUN: opt -simple-loop-unswitch -enable-nontrivial-unswitch -S < %s | FileCheck %s ; RUN: opt -simple-loop-unswitch -enable-nontrivial-unswitch -enable-mssa-loop-dependency=true -verify-memoryssa -S < %s | FileCheck %s diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/not-safe-to-clone.ll b/llvm/test/Transforms/SimpleLoopUnswitch/not-safe-to-clone.ll index 56727b7..d9a45dac2 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/not-safe-to-clone.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/not-safe-to-clone.ll @@ -1,4 +1,4 @@ -; RUN: opt -passes='unswitch' %s -S | FileCheck %s +; RUN: opt -passes='simple-loop-unswitch' %s -S | FileCheck %s declare i1 @foo() diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/partial-unswitch-mssa-threshold.ll b/llvm/test/Transforms/SimpleLoopUnswitch/partial-unswitch-mssa-threshold.ll index 477e4e5..6bce0497 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/partial-unswitch-mssa-threshold.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/partial-unswitch-mssa-threshold.ll @@ -1,5 +1,5 @@ -; RUN: opt -loop-unswitch-memoryssa-threshold=0 -memssa-check-limit=1 -passes='loop-mssa(unswitch),verify' -S < %s | FileCheck --check-prefix=THRESHOLD-0 %s -; RUN: opt -memssa-check-limit=1 -passes='loop-mssa(unswitch),verify' -S < %s | FileCheck --check-prefix=THRESHOLD-DEFAULT %s +; RUN: opt -loop-unswitch-memoryssa-threshold=0 -memssa-check-limit=1 -passes='loop-mssa(simple-loop-unswitch),verify' -S < %s | FileCheck --check-prefix=THRESHOLD-0 %s +; RUN: opt -memssa-check-limit=1 -passes='loop-mssa(simple-loop-unswitch),verify' -S < %s | FileCheck --check-prefix=THRESHOLD-DEFAULT %s ; Make sure -loop-unswitch-memoryssa-threshold works. The test uses ; -memssa-check-limit=1 to effectively disable any MemorySSA optimizations diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/partial-unswitch-update-memoryssa.ll b/llvm/test/Transforms/SimpleLoopUnswitch/partial-unswitch-update-memoryssa.ll index df9da1a..aa57e9a 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/partial-unswitch-update-memoryssa.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/partial-unswitch-update-memoryssa.ll @@ -1,5 +1,5 @@ -; RUN: opt -passes='loop-mssa(unswitch),verify' -verify-dom-info -verify-memoryssa -S %s | FileCheck %s -; RUN: opt -passes='loop-mssa(unswitch),verify' -memssa-check-limit=3 -verify-dom-info -verify-memoryssa -S %s | FileCheck %s +; RUN: opt -passes='loop-mssa(simple-loop-unswitch),verify' -verify-dom-info -verify-memoryssa -S %s | FileCheck %s +; RUN: opt -passes='loop-mssa(simple-loop-unswitch),verify' -memssa-check-limit=3 -verify-dom-info -verify-memoryssa -S %s | FileCheck %s declare void @clobber() diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/partial-unswitch.ll b/llvm/test/Transforms/SimpleLoopUnswitch/partial-unswitch.ll index 2736344..edad7a4 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/partial-unswitch.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/partial-unswitch.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -passes='loop-mssa(unswitch),verify' -S < %s | FileCheck %s +; RUN: opt -passes='loop-mssa(simple-loop-unswitch),verify' -S < %s | FileCheck %s declare void @clobber() diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch-iteration.ll b/llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch-iteration.ll index 6659248..914af26 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch-iteration.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch-iteration.ll @@ -1,5 +1,5 @@ -; RUN: opt -passes='loop(loop-instsimplify,loop-simplifycfg,unswitch),verify' -S < %s | FileCheck %s -; RUN: opt -verify-memoryssa -passes='loop-mssa(loop-instsimplify,loop-simplifycfg,unswitch),verify' -S < %s | FileCheck %s +; RUN: opt -passes='loop(loop-instsimplify,loop-simplifycfg,simple-loop-unswitch),verify' -S < %s | FileCheck %s +; RUN: opt -verify-memoryssa -passes='loop-mssa(loop-instsimplify,loop-simplifycfg,simple-loop-unswitch),verify' -S < %s | FileCheck %s declare void @some_func() noreturn diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch-profmd.ll b/llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch-profmd.ll index 2deb9ce..a8773b6 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch-profmd.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch-profmd.ll @@ -1,7 +1,7 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py ; then metadata checks MDn were added manually. -; RUN: opt -passes='loop(unswitch),verify' -S < %s | FileCheck %s -; RUN: opt -verify-memoryssa -passes='loop-mssa(unswitch),verify' -S < %s | FileCheck %s +; RUN: opt -passes='loop(simple-loop-unswitch),verify' -S < %s | FileCheck %s +; RUN: opt -verify-memoryssa -passes='loop-mssa(simple-loop-unswitch),verify' -S < %s | FileCheck %s declare void @some_func() diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch.ll b/llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch.ll index 0870661..9b46010 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch.ll @@ -1,5 +1,5 @@ -; RUN: opt -passes='loop(unswitch),verify' -S < %s | FileCheck %s -; RUN: opt -verify-memoryssa -passes='loop-mssa(unswitch),verify' -S < %s | FileCheck %s +; RUN: opt -passes='loop(simple-loop-unswitch),verify' -S < %s | FileCheck %s +; RUN: opt -verify-memoryssa -passes='loop-mssa(simple-loop-unswitch),verify' -S < %s | FileCheck %s declare void @some_func() noreturn declare void @sink(i32) diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/update-scev.ll b/llvm/test/Transforms/SimpleLoopUnswitch/update-scev.ll index 2d59d75..356fb87 100644 --- a/llvm/test/Transforms/SimpleLoopUnswitch/update-scev.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/update-scev.ll @@ -1,5 +1,5 @@ -; RUN: opt -passes='print,loop(unswitch,loop-instsimplify),print' -S < %s 2>%t.scev | FileCheck %s -; RUN: opt -verify-memoryssa -passes='print,loop-mssa(unswitch,loop-instsimplify),print' -S < %s 2>%t.scev | FileCheck %s +; RUN: opt -passes='print,loop(simple-loop-unswitch,loop-instsimplify),print' -S < %s 2>%t.scev | FileCheck %s +; RUN: opt -verify-memoryssa -passes='print,loop-mssa(simple-loop-unswitch,loop-instsimplify),print' -S < %s 2>%t.scev | FileCheck %s ; RUN: FileCheck %s --check-prefix=SCEV < %t.scev target triple = "x86_64-unknown-linux-gnu" -- 2.7.4