Skip to content

Commit 89ec6be

Browse files
committed
misched-load-clustering.ll: exercise new clustering flags
- add store-clustering=false to the existing LDCLUSTER test; - add a new STCLUSTER test with load-clustering=false; - add a new DEFAULTCLUSTER test with default clustering options.
1 parent 4963023 commit 89ec6be

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

llvm/test/CodeGen/RISCV/misched-load-clustering.ll

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,31 @@
77
; RUN: -riscv-misched-store-clustering=false \
88
; RUN: -debug-only=machine-scheduler -o - 2>&1 < %s \
99
; RUN: | FileCheck -check-prefix=NOCLUSTER %s
10+
;
11+
; RUN: llc -mtriple=riscv32 -verify-misched \
12+
; RUN: -riscv-misched-load-clustering=false \
13+
; RUN: -debug-only=machine-scheduler -o - 2>&1 < %s \
14+
; RUN: | FileCheck -check-prefix=STCLUSTER %s
15+
; RUN: llc -mtriple=riscv64 -verify-misched \
16+
; RUN: -riscv-misched-load-clustering=false \
17+
; RUN: -debug-only=machine-scheduler -o - 2>&1 < %s \
18+
; RUN: | FileCheck -check-prefix=STCLUSTER %s
19+
;
1020
; RUN: llc -mtriple=riscv32 -verify-misched \
21+
; RUN: -riscv-misched-store-clustering=false \
1122
; RUN: -debug-only=machine-scheduler -o - 2>&1 < %s \
1223
; RUN: | FileCheck -check-prefix=LDCLUSTER %s
1324
; RUN: llc -mtriple=riscv64 -verify-misched \
25+
; RUN: -riscv-misched-store-clustering=false \
1426
; RUN: -debug-only=machine-scheduler -o - 2>&1 < %s \
1527
; RUN: | FileCheck -check-prefix=LDCLUSTER %s
28+
;
29+
; RUN: llc -mtriple=riscv32 -verify-misched \
30+
; RUN: -debug-only=machine-scheduler -o - 2>&1 < %s \
31+
; RUN: | FileCheck -check-prefix=DEFAULTCLUSTER %s
32+
; RUN: llc -mtriple=riscv64 -verify-misched \
33+
; RUN: -debug-only=machine-scheduler -o - 2>&1 < %s \
34+
; RUN: | FileCheck -check-prefix=DEFAULTCLUSTER %s
1635

1736

1837
define i32 @load_clustering_1(ptr nocapture %p) {
@@ -24,13 +43,29 @@ define i32 @load_clustering_1(ptr nocapture %p) {
2443
; NOCLUSTER: SU(4): %4:gpr = LW %0:gpr, 4
2544
; NOCLUSTER: SU(5): %6:gpr = LW %0:gpr, 16
2645
;
46+
; STCLUSTER: ********** MI Scheduling **********
47+
; STCLUSTER-LABEL: load_clustering_1:%bb.0
48+
; STCLUSTER: *** Final schedule for %bb.0 ***
49+
; STCLUSTER: SU(1): %1:gpr = LW %0:gpr, 12
50+
; STCLUSTER: SU(2): %2:gpr = LW %0:gpr, 8
51+
; STCLUSTER: SU(4): %4:gpr = LW %0:gpr, 4
52+
; STCLUSTER: SU(5): %6:gpr = LW %0:gpr, 16
53+
;
2754
; LDCLUSTER: ********** MI Scheduling **********
2855
; LDCLUSTER-LABEL: load_clustering_1:%bb.0
2956
; LDCLUSTER: *** Final schedule for %bb.0 ***
3057
; LDCLUSTER: SU(4): %4:gpr = LW %0:gpr, 4
3158
; LDCLUSTER: SU(2): %2:gpr = LW %0:gpr, 8
3259
; LDCLUSTER: SU(1): %1:gpr = LW %0:gpr, 12
3360
; LDCLUSTER: SU(5): %6:gpr = LW %0:gpr, 16
61+
;
62+
; DEFAULTCLUSTER: ********** MI Scheduling **********
63+
; DEFAULTCLUSTER-LABEL: load_clustering_1:%bb.0
64+
; DEFAULTCLUSTER: *** Final schedule for %bb.0 ***
65+
; DEFAULTCLUSTER: SU(4): %4:gpr = LW %0:gpr, 4
66+
; DEFAULTCLUSTER: SU(2): %2:gpr = LW %0:gpr, 8
67+
; DEFAULTCLUSTER: SU(1): %1:gpr = LW %0:gpr, 12
68+
; DEFAULTCLUSTER: SU(5): %6:gpr = LW %0:gpr, 16
3469
entry:
3570
%arrayidx0 = getelementptr inbounds i32, ptr %p, i32 3
3671
%val0 = load i32, ptr %arrayidx0

0 commit comments

Comments
 (0)