Skip to content

Commit a95796a

Browse files
committed
[NewPM][LoopUnroll] Rename unroll* to loop-unroll*
The legacy pass is called "loop-unroll", but in the new PM it's called "unroll". Also applied to unroll-and-jam and unroll-full. Fixes various check-llvm tests when NPM is turned on. Reviewed By: Whitney, dmgreen Differential Revision: https://reviews.llvm.org/D82590
1 parent 5ca7513 commit a95796a

40 files changed

+246
-246
lines changed

llvm/lib/Passes/PassRegistry.def

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ FUNCTION_PASS("guard-widening", GuardWideningPass())
209209
FUNCTION_PASS("load-store-vectorizer", LoadStoreVectorizerPass())
210210
FUNCTION_PASS("loop-simplify", LoopSimplifyPass())
211211
FUNCTION_PASS("loop-sink", LoopSinkPass())
212+
FUNCTION_PASS("loop-unroll-and-jam", LoopUnrollAndJamPass())
212213
FUNCTION_PASS("lowerinvoke", LowerInvokePass())
213214
FUNCTION_PASS("mem2reg", PromotePass())
214215
FUNCTION_PASS("memcpyopt", MemCpyOptPass())
@@ -249,7 +250,6 @@ FUNCTION_PASS("speculative-execution", SpeculativeExecutionPass())
249250
FUNCTION_PASS("spec-phis", SpeculateAroundPHIsPass())
250251
FUNCTION_PASS("sroa", SROA())
251252
FUNCTION_PASS("tailcallelim", TailCallElimPass())
252-
FUNCTION_PASS("unroll-and-jam", LoopUnrollAndJamPass())
253253
FUNCTION_PASS("vector-combine", VectorCombinePass())
254254
FUNCTION_PASS("verify", VerifierPass())
255255
FUNCTION_PASS("verify<domtree>", DominatorTreeVerifierPass())
@@ -271,7 +271,7 @@ FUNCTION_PASS("tsan", ThreadSanitizerPass())
271271
#ifndef FUNCTION_PASS_WITH_PARAMS
272272
#define FUNCTION_PASS_WITH_PARAMS(NAME, CREATE_PASS, PARSER)
273273
#endif
274-
FUNCTION_PASS_WITH_PARAMS("unroll",
274+
FUNCTION_PASS_WITH_PARAMS("loop-unroll",
275275
[](LoopUnrollOptions Opts) {
276276
return LoopUnrollPass(Opts);
277277
},
@@ -333,7 +333,7 @@ LOOP_PASS("loop-deletion", LoopDeletionPass())
333333
LOOP_PASS("simplify-cfg", LoopSimplifyCFGPass())
334334
LOOP_PASS("strength-reduce", LoopStrengthReducePass())
335335
LOOP_PASS("indvars", IndVarSimplifyPass())
336-
LOOP_PASS("unroll-full", LoopFullUnrollPass())
336+
LOOP_PASS("loop-unroll-full", LoopFullUnrollPass())
337337
LOOP_PASS("print-access-info", LoopAccessInfoPrinterPass(dbgs()))
338338
LOOP_PASS("print<ddg>", DDGAnalysisPrinterPass(dbgs()))
339339
LOOP_PASS("print<ivusers>", IVUsersPrinterPass(dbgs()))

llvm/test/Other/loop-pass-printer.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
; RUN: -loop-unroll -print-after=loop-unroll -filter-print-funcs=bar \
1212
; RUN: | FileCheck %s -check-prefix=BAR -check-prefix=BAR-OLD
1313
; RUN: opt < %s 2>&1 -disable-output \
14-
; RUN: -passes='require<opt-remark-emit>,loop(unroll-full)' -print-after-all -filter-print-funcs=bar \
14+
; RUN: -passes='require<opt-remark-emit>,loop(loop-unroll-full)' -print-after-all -filter-print-funcs=bar \
1515
; RUN: | FileCheck %s -check-prefix=BAR
1616
; RUN: opt < %s 2>&1 -disable-output \
1717
; RUN: -loop-unroll -print-after=loop-unroll -filter-print-funcs=foo -print-module-scope \
1818
; RUN: | FileCheck %s -check-prefix=FOO-MODULE -check-prefix=FOO-MODULE-OLD
1919
; RUN: opt < %s 2>&1 -disable-output \
20-
; RUN: -passes='require<opt-remark-emit>,loop(unroll-full)' -print-after-all -filter-print-funcs=foo -print-module-scope \
20+
; RUN: -passes='require<opt-remark-emit>,loop(loop-unroll-full)' -print-after-all -filter-print-funcs=foo -print-module-scope \
2121
; RUN: | FileCheck %s -check-prefix=FOO-MODULE
2222

2323
; DEL: IR Dump Before {{Delete dead loops|LoopDeletionPass}}

llvm/test/Transforms/Inline/last-call-bonus.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
; preprocess the test.
1111

1212
; RUN: opt < %s -loop-unroll -inline -unroll-threshold=15000 -inline-threshold=250 -S | FileCheck %s
13-
; RUN: opt < %s -passes='function(require<opt-remark-emit>,unroll),require<profile-summary>,cgscc(inline)' -unroll-threshold=15000 -inline-threshold=250 -S | FileCheck %s
13+
; RUN: opt < %s -passes='function(require<opt-remark-emit>,loop-unroll),require<profile-summary>,cgscc(inline)' -unroll-threshold=15000 -inline-threshold=250 -S | FileCheck %s
1414
; CHECK-LABEL: define internal i32 @bar()
1515

1616
define internal i32 @baz() {

llvm/test/Transforms/Inline/last-call-no-bonus.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; to the internal functions are cold, thereby preventing the last call to
33
; static bonus from being applied.
44

5-
; RUN: opt < %s -passes='function(require<opt-remark-emit>,unroll),require<profile-summary>,cgscc(inline)' -unroll-threshold=15000 -inline-threshold=250 -S | FileCheck %s
5+
; RUN: opt < %s -passes='function(require<opt-remark-emit>,loop-unroll),require<profile-summary>,cgscc(inline)' -unroll-threshold=15000 -inline-threshold=250 -S | FileCheck %s
66

77
; CHECK-LABEL: define internal i32 @baz
88
define internal i32 @baz() {

llvm/test/Transforms/LoopUnroll/basic.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; RUN: opt < %s -loop-unroll -S | FileCheck %s
2-
; RUN: opt < %s -passes='require<opt-remark-emit>,unroll' -S | FileCheck %s
2+
; RUN: opt < %s -passes='require<opt-remark-emit>,loop-unroll' -S | FileCheck %s
33

44

55
; This should not unroll since the address of the loop header is taken.

llvm/test/Transforms/LoopUnroll/disable-full-unroll-by-opt.ll

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
; Default behavior
2-
; RUN: opt < %s -passes='unroll' -S | FileCheck %s -check-prefixes=ENABLE,COMMON
2+
; RUN: opt < %s -passes='loop-unroll' -S | FileCheck %s -check-prefixes=ENABLE,COMMON
33

44
; Pass option
5-
; RUN: opt < %s -passes='unroll<full-unroll-max=0>' -S | FileCheck %s -check-prefixes=DISABLE,COMMON
6-
; RUN: opt < %s -passes='unroll<full-unroll-max=30>' -S | FileCheck %s -check-prefixes=DISABLE,COMMON
7-
; RUN: opt < %s -passes='unroll<full-unroll-max=36>' -S | FileCheck %s -check-prefixes=ENABLE,COMMON
5+
; RUN: opt < %s -passes='loop-unroll<full-unroll-max=0>' -S | FileCheck %s -check-prefixes=DISABLE,COMMON
6+
; RUN: opt < %s -passes='loop-unroll<full-unroll-max=30>' -S | FileCheck %s -check-prefixes=DISABLE,COMMON
7+
; RUN: opt < %s -passes='loop-unroll<full-unroll-max=36>' -S | FileCheck %s -check-prefixes=ENABLE,COMMON
88

99
; cl::opt option
10-
; RUN: opt < %s -passes='unroll' -unroll-full-max-count=0 -S | FileCheck %s -check-prefixes=DISABLE,COMMON
11-
; RUN: opt < %s -passes='unroll' -unroll-full-max-count=30 -S | FileCheck %s -check-prefixes=DISABLE,COMMON
12-
; RUN: opt < %s -passes='unroll' -unroll-full-max-count=36 -S | FileCheck %s -check-prefixes=ENABLE,COMMON
10+
; RUN: opt < %s -passes='loop-unroll' -unroll-full-max-count=0 -S | FileCheck %s -check-prefixes=DISABLE,COMMON
11+
; RUN: opt < %s -passes='loop-unroll' -unroll-full-max-count=30 -S | FileCheck %s -check-prefixes=DISABLE,COMMON
12+
; RUN: opt < %s -passes='loop-unroll' -unroll-full-max-count=36 -S | FileCheck %s -check-prefixes=ENABLE,COMMON
1313

1414
; Pass option has a priority over cl::opt
15-
; RUN: opt < %s -passes='unroll<full-unroll-max=30>' -unroll-full-max-count=36 -S | FileCheck %s -check-prefixes=DISABLE,COMMON
16-
; RUN: opt < %s -passes='unroll<full-unroll-max=36>' -unroll-full-max-count=30 -S | FileCheck %s -check-prefixes=ENABLE,COMMON
15+
; RUN: opt < %s -passes='loop-unroll<full-unroll-max=30>' -unroll-full-max-count=36 -S | FileCheck %s -check-prefixes=DISABLE,COMMON
16+
; RUN: opt < %s -passes='loop-unroll<full-unroll-max=36>' -unroll-full-max-count=30 -S | FileCheck %s -check-prefixes=ENABLE,COMMON
1717

1818
define void @test() {
1919
; COMMON-LABEL: @test(

llvm/test/Transforms/LoopUnroll/full-unroll-bad-cost.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; RUN: opt -S -loop-unroll < %s | FileCheck %s
2-
; RUN: opt < %s -passes='require<opt-remark-emit>,loop(unroll-full)' -S | FileCheck %s
2+
; RUN: opt < %s -passes='require<opt-remark-emit>,loop(loop-unroll-full)' -S | FileCheck %s
33

44
; LLVM should not try to fully unroll this loop.
55

llvm/test/Transforms/LoopUnroll/full-unroll-crashers.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; Check that we don't crash on corner cases.
22
; RUN: opt < %s -S -loop-unroll -unroll-max-iteration-count-to-analyze=1000 -unroll-threshold=1 -unroll-max-percent-threshold-boost=200 -o /dev/null
3-
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(unroll-full)' -unroll-max-iteration-count-to-analyze=1000 -unroll-threshold=1 -unroll-max-percent-threshold-boost=200 -o /dev/null
3+
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(loop-unroll-full)' -unroll-max-iteration-count-to-analyze=1000 -unroll-threshold=1 -unroll-max-percent-threshold-boost=200 -o /dev/null
44
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
55

66
@known_constant = internal unnamed_addr constant [10 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1], align 16

llvm/test/Transforms/LoopUnroll/full-unroll-heuristics-2.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; RUN: opt < %s -S -loop-unroll -unroll-max-iteration-count-to-analyze=1000 -unroll-threshold=10 -unroll-max-percent-threshold-boost=200 | FileCheck %s
2-
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(unroll-full)' -unroll-max-iteration-count-to-analyze=1000 -unroll-threshold=10 -unroll-max-percent-threshold-boost=200 | FileCheck %s
2+
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(loop-unroll-full)' -unroll-max-iteration-count-to-analyze=1000 -unroll-threshold=10 -unroll-max-percent-threshold-boost=200 | FileCheck %s
33
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
44

55
@unknown_global = internal unnamed_addr global [9 x i32] [i32 0, i32 -1, i32 0, i32 -1, i32 5, i32 -1, i32 0, i32 -1, i32 0], align 16

llvm/test/Transforms/LoopUnroll/full-unroll-heuristics-cmp.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; RUN: opt < %s -S -loop-unroll -unroll-max-iteration-count-to-analyze=100 -unroll-threshold=10 -unroll-max-percent-threshold-boost=200 | FileCheck %s
2-
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(unroll-full)' -unroll-max-iteration-count-to-analyze=100 -unroll-threshold=10 -unroll-max-percent-threshold-boost=200 | FileCheck %s
2+
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(loop-unroll-full)' -unroll-max-iteration-count-to-analyze=100 -unroll-threshold=10 -unroll-max-percent-threshold-boost=200 | FileCheck %s
33
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
44

55
@known_constant = internal unnamed_addr constant [10 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1], align 16

llvm/test/Transforms/LoopUnroll/full-unroll-heuristics-dce.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; RUN: opt < %s -S -loop-unroll -unroll-max-iteration-count-to-analyze=100 -unroll-threshold=12 -unroll-max-percent-threshold-boost=400 | FileCheck %s
2-
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(unroll-full)' -unroll-max-iteration-count-to-analyze=100 -unroll-threshold=12 -unroll-max-percent-threshold-boost=400 | FileCheck %s
2+
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(loop-unroll-full)' -unroll-max-iteration-count-to-analyze=100 -unroll-threshold=12 -unroll-max-percent-threshold-boost=400 | FileCheck %s
33
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
44

55
@known_constant = internal unnamed_addr constant [10 x i32] [i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0], align 16

llvm/test/Transforms/LoopUnroll/full-unroll-heuristics-geps.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; RUN: opt < %s -S -loop-unroll -unroll-max-iteration-count-to-analyze=100 -unroll-threshold=10 -unroll-max-percent-threshold-boost=200 | FileCheck %s
2-
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(unroll-full)' -unroll-max-iteration-count-to-analyze=100 -unroll-threshold=10 -unroll-max-percent-threshold-boost=200 | FileCheck %s
2+
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(loop-unroll-full)' -unroll-max-iteration-count-to-analyze=100 -unroll-threshold=10 -unroll-max-percent-threshold-boost=200 | FileCheck %s
33
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
44

55
; When examining gep-instructions we shouldn't consider them simplified if the

llvm/test/Transforms/LoopUnroll/full-unroll-heuristics-phi-prop.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; RUN: opt < %s -S -loop-unroll -unroll-max-iteration-count-to-analyze=100 -unroll-threshold=10 -unroll-max-percent-threshold-boost=200 | FileCheck %s
2-
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(unroll-full)' -unroll-max-iteration-count-to-analyze=100 -unroll-threshold=10 -unroll-max-percent-threshold-boost=200 | FileCheck %s
2+
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(loop-unroll-full)' -unroll-max-iteration-count-to-analyze=100 -unroll-threshold=10 -unroll-max-percent-threshold-boost=200 | FileCheck %s
33
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
44

55
define i64 @propagate_loop_phis() {

llvm/test/Transforms/LoopUnroll/full-unroll-heuristics.ll

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
; RUN: opt < %s -S -loop-unroll -unroll-max-iteration-count-to-analyze=1000 -unroll-threshold=20 -unroll-max-percent-threshold-boost=200 | FileCheck %s -check-prefix=TEST2
2222
; RUN: opt < %s -S -loop-unroll -unroll-max-iteration-count-to-analyze=1000 -unroll-threshold=20 -unroll-max-percent-threshold-boost=100 | FileCheck %s -check-prefix=TEST3
2323

24-
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(unroll-full)' -unroll-max-iteration-count-to-analyze=1000 -unroll-threshold=10 -unroll-max-percent-threshold-boost=100 | FileCheck %s -check-prefix=TEST1
25-
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(unroll-full)' -unroll-max-iteration-count-to-analyze=1000 -unroll-threshold=20 -unroll-max-percent-threshold-boost=200 | FileCheck %s -check-prefix=TEST2
26-
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(unroll-full)' -unroll-max-iteration-count-to-analyze=1000 -unroll-threshold=20 -unroll-max-percent-threshold-boost=100 | FileCheck %s -check-prefix=TEST3
24+
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(loop-unroll-full)' -unroll-max-iteration-count-to-analyze=1000 -unroll-threshold=10 -unroll-max-percent-threshold-boost=100 | FileCheck %s -check-prefix=TEST1
25+
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(loop-unroll-full)' -unroll-max-iteration-count-to-analyze=1000 -unroll-threshold=20 -unroll-max-percent-threshold-boost=200 | FileCheck %s -check-prefix=TEST2
26+
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(loop-unroll-full)' -unroll-max-iteration-count-to-analyze=1000 -unroll-threshold=20 -unroll-max-percent-threshold-boost=100 | FileCheck %s -check-prefix=TEST3
2727

2828
; Check that these work when the unroller has partial unrolling enabled too.
29-
; RUN: opt < %s -S -passes='require<opt-remark-emit>,unroll' -unroll-max-iteration-count-to-analyze=1000 -unroll-threshold=10 -unroll-max-percent-threshold-boost=100 | FileCheck %s -check-prefix=TEST1
30-
; RUN: opt < %s -S -passes='require<opt-remark-emit>,unroll' -unroll-max-iteration-count-to-analyze=1000 -unroll-threshold=20 -unroll-max-percent-threshold-boost=200 | FileCheck %s -check-prefix=TEST2
31-
; RUN: opt < %s -S -passes='require<opt-remark-emit>,unroll' -unroll-max-iteration-count-to-analyze=1000 -unroll-threshold=20 -unroll-max-percent-threshold-boost=100 | FileCheck %s -check-prefix=TEST3
29+
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop-unroll' -unroll-max-iteration-count-to-analyze=1000 -unroll-threshold=10 -unroll-max-percent-threshold-boost=100 | FileCheck %s -check-prefix=TEST1
30+
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop-unroll' -unroll-max-iteration-count-to-analyze=1000 -unroll-threshold=20 -unroll-max-percent-threshold-boost=200 | FileCheck %s -check-prefix=TEST2
31+
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop-unroll' -unroll-max-iteration-count-to-analyze=1000 -unroll-threshold=20 -unroll-max-percent-threshold-boost=100 | FileCheck %s -check-prefix=TEST3
3232

3333
; If the absolute threshold is too low, we should not unroll:
3434
; TEST1: %array_const_idx = getelementptr inbounds [9 x i32], [9 x i32]* @known_constant, i64 0, i64 %iv
@@ -41,7 +41,7 @@
4141

4242
; And check that we don't crash when we're not allowed to do any analysis.
4343
; RUN: opt < %s -loop-unroll -unroll-max-iteration-count-to-analyze=0 -disable-output
44-
; RUN: opt < %s -passes='require<opt-remark-emit>,loop(unroll-full)' -unroll-max-iteration-count-to-analyze=0 -disable-output
44+
; RUN: opt < %s -passes='require<opt-remark-emit>,loop(loop-unroll-full)' -unroll-max-iteration-count-to-analyze=0 -disable-output
4545
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
4646

4747
@known_constant = internal unnamed_addr constant [9 x i32] [i32 0, i32 -1, i32 0, i32 -1, i32 5, i32 -1, i32 0, i32 -1, i32 0], align 16

llvm/test/Transforms/LoopUnroll/full-unroll-keep-first-exit.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; RUN: opt -S -loop-unroll < %s | FileCheck %s
2-
; RUN: opt -S -passes='require<opt-remark-emit>,loop(unroll-full)' < %s | FileCheck %s
2+
; RUN: opt -S -passes='require<opt-remark-emit>,loop(loop-unroll-full)' < %s | FileCheck %s
33

44
; Unroll twice, with first loop exit kept
55
; CHECK-LABEL: @s32_max1

llvm/test/Transforms/LoopUnroll/nonlatchcondbr.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
22
; RUN: opt < %s -loop-unroll -unroll-runtime -unroll-count=4 -S | FileCheck %s
3-
; RUN: opt < %s -passes='require<opt-remark-emit>,unroll' -unroll-runtime -unroll-count=4 -S | FileCheck %s
3+
; RUN: opt < %s -passes='require<opt-remark-emit>,loop-unroll' -unroll-runtime -unroll-count=4 -S | FileCheck %s
44

55
; Check that loop unroll pass correctly handle loops with
66
; single exiting block not the loop header or latch.

llvm/test/Transforms/LoopUnroll/partial-unroll-const-bounds.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
; RUN: opt < %s -S -unroll-partial-threshold=20 -unroll-threshold=20 -loop-unroll -unroll-allow-partial -unroll-runtime -unroll-allow-remainder -unroll-max-percent-threshold-boost=100 | FileCheck %s
2-
; RUN: opt < %s -S -passes='require<opt-remark-emit>,unroll' -unroll-partial-threshold=20 -unroll-threshold=20 -unroll-allow-partial -unroll-runtime -unroll-allow-remainder -unroll-max-percent-threshold-boost=100 | FileCheck %s
2+
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop-unroll' -unroll-partial-threshold=20 -unroll-threshold=20 -unroll-allow-partial -unroll-runtime -unroll-allow-remainder -unroll-max-percent-threshold-boost=100 | FileCheck %s
33
;
44
; Also check that the simple unroller doesn't allow the partial unrolling.
5-
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(unroll-full)' -unroll-partial-threshold=20 -unroll-threshold=20 -unroll-allow-partial -unroll-runtime -unroll-allow-remainder -unroll-max-percent-threshold-boost=100 | FileCheck %s --check-prefix=CHECK-NO-UNROLL
5+
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(loop-unroll-full)' -unroll-partial-threshold=20 -unroll-threshold=20 -unroll-allow-partial -unroll-runtime -unroll-allow-remainder -unroll-max-percent-threshold-boost=100 | FileCheck %s --check-prefix=CHECK-NO-UNROLL
66

77
; The Loop TripCount is 9. However unroll factors 3 or 9 exceed given threshold.
88
; The test checks that we choose a smaller, power-of-two, unroll count and do not give up on unrolling.

llvm/test/Transforms/LoopUnroll/peel-loop-inner.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt < %s -S -passes='require<opt-remark-emit>,unroll<peeling;no-runtime>,simplify-cfg,instcombine' -unroll-force-peel-count=3 -verify-dom-info | FileCheck %s
1+
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop-unroll<peeling;no-runtime>,simplify-cfg,instcombine' -unroll-force-peel-count=3 -verify-dom-info | FileCheck %s
22

33
define void @basic(i32 %K, i32 %N) {
44
; CHECK-LABEL: @basic(

llvm/test/Transforms/LoopUnroll/peel-loop-pgo-deopt-idom-2.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; REQUIRES: asserts
22
; RUN: opt < %s -S -debug-only=loop-unroll -loop-unroll -unroll-runtime -unroll-peel-multi-deopt-exit 2>&1 | FileCheck %s
3-
; RUN: opt < %s -S -debug-only=loop-unroll -unroll-peel-multi-deopt-exit -passes='require<profile-summary>,function(require<opt-remark-emit>,unroll)' 2>&1 | FileCheck %s
3+
; RUN: opt < %s -S -debug-only=loop-unroll -unroll-peel-multi-deopt-exit -passes='require<profile-summary>,function(require<opt-remark-emit>,loop-unroll)' 2>&1 | FileCheck %s
44

55
; Regression test for setting the correct idom for exit blocks.
66

llvm/test/Transforms/LoopUnroll/peel-loop-pgo-deopt-idom.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; REQUIRES: asserts
22
; RUN: opt < %s -S -debug-only=loop-unroll -loop-unroll -unroll-runtime -unroll-peel-multi-deopt-exit 2>&1 | FileCheck %s
3-
; RUN: opt < %s -S -debug-only=loop-unroll -unroll-peel-multi-deopt-exit -passes='require<profile-summary>,function(require<opt-remark-emit>,unroll)' 2>&1 | FileCheck %s
3+
; RUN: opt < %s -S -debug-only=loop-unroll -unroll-peel-multi-deopt-exit -passes='require<profile-summary>,function(require<opt-remark-emit>,loop-unroll)' 2>&1 | FileCheck %s
44

55
; Regression test for setting the correct idom for exit blocks.
66

llvm/test/Transforms/LoopUnroll/peel-loop-pgo-deopt.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; REQUIRES: asserts
22
; RUN: opt < %s -S -debug-only=loop-unroll -loop-unroll -unroll-runtime -unroll-peel-multi-deopt-exit 2>&1 | FileCheck %s
3-
; RUN: opt < %s -S -debug-only=loop-unroll -unroll-peel-multi-deopt-exit -passes='require<profile-summary>,function(require<opt-remark-emit>,unroll)' 2>&1 | FileCheck %s
4-
; RUN: opt < %s -S -debug-only=loop-unroll -unroll-peel-multi-deopt-exit -passes='require<profile-summary>,function(require<opt-remark-emit>,unroll<no-profile-peeling>)' 2>&1 | FileCheck %s --check-prefixes=CHECK-NO-PEEL
3+
; RUN: opt < %s -S -debug-only=loop-unroll -unroll-peel-multi-deopt-exit -passes='require<profile-summary>,function(require<opt-remark-emit>,loop-unroll)' 2>&1 | FileCheck %s
4+
; RUN: opt < %s -S -debug-only=loop-unroll -unroll-peel-multi-deopt-exit -passes='require<profile-summary>,function(require<opt-remark-emit>,loop-unroll<no-profile-peeling>)' 2>&1 | FileCheck %s --check-prefixes=CHECK-NO-PEEL
55

66
; Make sure we use the profile information correctly to peel-off 3 iterations
77
; from the loop, and update the branch weights for the peeled loop properly.

0 commit comments

Comments
 (0)