diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch-nested.ll b/llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch-nested.ll --- a/llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch-nested.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch-nested.ll @@ -4,7 +4,7 @@ ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=0 -unswitch-siblings-toplevel-div=1 \ -; RUN: -passes='loop(simple-loop-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 \ @@ -24,12 +24,7 @@ ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=4 -unswitch-siblings-toplevel-div=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(simple-loop-unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop-mssa(licm,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 +32,7 @@ ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=4 -unswitch-siblings-toplevel-div=2 \ -; 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(simple-loop-unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop-mssa(licm,simple-loop-unswitch),print' -disable-output 2>&1 | \ ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-UNSCALE4-DIV2 ; ; Get @@ -50,11 +40,7 @@ ; loop nests when cost multiplier is disabled: ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=false \ -; 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(simple-loop-unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop-mssa(licm,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 --- a/llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch-nested2.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch-nested2.ll @@ -30,12 +30,7 @@ ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=3 -unswitch-siblings-toplevel-div=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(simple-loop-unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop-mssa(licm,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 +38,13 @@ ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=3 -unswitch-siblings-toplevel-div=2 \ -; 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(simple-loop-unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop-mssa(licm,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(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(simple-loop-unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop-mssa(licm,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-switch-unswitch.ll b/llvm/test/Transforms/SimpleLoopUnswitch/exponential-switch-unswitch.ll --- a/llvm/test/Transforms/SimpleLoopUnswitch/exponential-switch-unswitch.ll +++ b/llvm/test/Transforms/SimpleLoopUnswitch/exponential-switch-unswitch.ll @@ -30,12 +30,7 @@ ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=8 -unswitch-siblings-toplevel-div=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(simple-loop-unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop-mssa(licm,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 +39,13 @@ ; ; RUN: opt < %s -enable-unswitch-cost-multiplier=true \ ; RUN: -unswitch-num-initial-unscaled-candidates=8 -unswitch-siblings-toplevel-div=8 \ -; 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(simple-loop-unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop-mssa(licm,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(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(simple-loop-unswitch),print' -disable-output 2>&1 | \ +; RUN: -passes='loop-mssa(licm,simple-loop-unswitch),print' -disable-output 2>&1 | \ ; RUN: sort -b -k 1 | FileCheck %s --check-prefixes=LOOP-MAX ; Single loop nest, not unswitched