xref: /llvm-project/llvm/test/CodeGen/RISCV/misched-mem-clustering.mir (revision 9122c5235ec85ce0c0ad337e862b006e7b349d84)
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
2# RUN: llc -mtriple=riscv64 -x mir -mcpu=sifive-p470 -verify-misched -enable-post-misched=false \
3# RUN:     -riscv-postmisched-load-store-clustering=false -debug-only=machine-scheduler \
4# RUN:     -start-before=machine-scheduler -stop-after=postmisched -misched-regpressure=false -o - 2>&1 < %s \
5# RUN:   | FileCheck -check-prefix=NOPOSTMISCHED %s
6# RUN: llc -mtriple=riscv64 -x mir -mcpu=sifive-p470 -mattr=+use-postra-scheduler -verify-misched -enable-post-misched=true \
7# RUN:     -riscv-postmisched-load-store-clustering=false -debug-only=machine-scheduler \
8# RUN:     -start-before=machine-scheduler -stop-after=postmisched -misched-regpressure=false -o - 2>&1 < %s \
9# RUN:   | FileCheck -check-prefix=NOCLUSTER %s
10# RUN: llc -mtriple=riscv64 -x mir -mcpu=sifive-p470 -mattr=+use-postra-scheduler -verify-misched -enable-post-misched=true \
11# RUN:     -debug-only=machine-scheduler \
12# RUN:     -start-before=machine-scheduler -stop-after=postmisched -misched-regpressure=false -o - 2>&1 < %s \
13# RUN:   | FileCheck -check-prefix=MEMCLUSTER %s
14
15# REQUIRES: asserts
16
17...
18---
19name:            mem_clustering_1
20tracksRegLiveness: true
21body:             |
22  bb.0:
23    liveins: $x6, $x10, $x14, $x15, $x16, $x17
24    ; NOPOSTMISCHED-LABEL: name: mem_clustering_1
25    ; NOPOSTMISCHED: liveins: $x6, $x10, $x14, $x15, $x16, $x17
26    ; NOPOSTMISCHED-NEXT: {{  $}}
27    ; NOPOSTMISCHED-NEXT: renamable $x5 = LW renamable $x15, 0 :: (load (s32))
28    ; NOPOSTMISCHED-NEXT: renamable $x7 = LW renamable $x15, 8 :: (load (s32))
29    ; NOPOSTMISCHED-NEXT: renamable $x28 = LW renamable $x15, 16 :: (load (s32))
30    ; NOPOSTMISCHED-NEXT: renamable $x29 = LW renamable $x15, 24 :: (load (s32))
31    ; NOPOSTMISCHED-NEXT: renamable $x11 = ADDW renamable $x6, killed renamable $x5
32    ; NOPOSTMISCHED-NEXT: renamable $x13 = ADDW killed renamable $x7, killed renamable $x28
33    ; NOPOSTMISCHED-NEXT: renamable $x11 = ADDW killed renamable $x11, killed renamable $x13
34    ; NOPOSTMISCHED-NEXT: renamable $x6 = ADDW killed renamable $x11, killed renamable $x29
35    ; NOPOSTMISCHED-NEXT: SW renamable $x14, renamable $x15, 0 :: (store (s32))
36    ; NOPOSTMISCHED-NEXT: SW renamable $x14, renamable $x15, 8 :: (store (s32))
37    ; NOPOSTMISCHED-NEXT: SW renamable $x14, renamable $x15, 16 :: (store (s32))
38    ; NOPOSTMISCHED-NEXT: SW renamable $x14, renamable $x15, 24 :: (store (s32))
39    ; NOPOSTMISCHED-NEXT: PseudoRET
40    ;
41    ; NOCLUSTER-LABEL: name: mem_clustering_1
42    ; NOCLUSTER: liveins: $x6, $x10, $x14, $x15, $x16, $x17
43    ; NOCLUSTER-NEXT: {{  $}}
44    ; NOCLUSTER-NEXT: renamable $x5 = LW renamable $x15, 0 :: (load (s32))
45    ; NOCLUSTER-NEXT: SW renamable $x14, renamable $x15, 0 :: (store (s32))
46    ; NOCLUSTER-NEXT: renamable $x11 = ADDW killed renamable $x6, killed renamable $x5
47    ; NOCLUSTER-NEXT: renamable $x7 = LW renamable $x15, 8 :: (load (s32))
48    ; NOCLUSTER-NEXT: renamable $x28 = LW renamable $x15, 16 :: (load (s32))
49    ; NOCLUSTER-NEXT: renamable $x29 = LW renamable $x15, 24 :: (load (s32))
50    ; NOCLUSTER-NEXT: renamable $x13 = ADDW killed renamable $x7, killed renamable $x28
51    ; NOCLUSTER-NEXT: SW renamable $x14, renamable $x15, 8 :: (store (s32))
52    ; NOCLUSTER-NEXT: SW renamable $x14, renamable $x15, 16 :: (store (s32))
53    ; NOCLUSTER-NEXT: SW killed renamable $x14, killed renamable $x15, 24 :: (store (s32))
54    ; NOCLUSTER-NEXT: renamable $x11 = ADDW killed renamable $x11, killed renamable $x13
55    ; NOCLUSTER-NEXT: renamable $x6 = ADDW killed renamable $x11, killed renamable $x29
56    ; NOCLUSTER-NEXT: PseudoRET
57    ;
58    ; MEMCLUSTER-LABEL: name: mem_clustering_1
59    ; MEMCLUSTER: liveins: $x6, $x10, $x14, $x15, $x16, $x17
60    ; MEMCLUSTER-NEXT: {{  $}}
61    ; MEMCLUSTER-NEXT: renamable $x5 = LW renamable $x15, 0 :: (load (s32))
62    ; MEMCLUSTER-NEXT: renamable $x7 = LW renamable $x15, 8 :: (load (s32))
63    ; MEMCLUSTER-NEXT: renamable $x28 = LW renamable $x15, 16 :: (load (s32))
64    ; MEMCLUSTER-NEXT: renamable $x29 = LW renamable $x15, 24 :: (load (s32))
65    ; MEMCLUSTER-NEXT: SW renamable $x14, renamable $x15, 0 :: (store (s32))
66    ; MEMCLUSTER-NEXT: SW renamable $x14, renamable $x15, 8 :: (store (s32))
67    ; MEMCLUSTER-NEXT: SW renamable $x14, renamable $x15, 16 :: (store (s32))
68    ; MEMCLUSTER-NEXT: SW killed renamable $x14, killed renamable $x15, 24 :: (store (s32))
69    ; MEMCLUSTER-NEXT: renamable $x11 = ADDW killed renamable $x6, killed renamable $x5
70    ; MEMCLUSTER-NEXT: renamable $x13 = ADDW killed renamable $x7, killed renamable $x28
71    ; MEMCLUSTER-NEXT: renamable $x11 = ADDW killed renamable $x11, killed renamable $x13
72    ; MEMCLUSTER-NEXT: renamable $x6 = ADDW killed renamable $x11, killed renamable $x29
73    ; MEMCLUSTER-NEXT: PseudoRET
74    renamable $x5 = LW renamable $x15, 0 :: (load (s32))
75    renamable $x7 = LW renamable $x15, 8 :: (load (s32))
76    renamable $x28 = LW renamable $x15, 16 :: (load (s32))
77    renamable $x29 = LW renamable $x15, 24 :: (load (s32))
78    renamable $x11 = ADDW killed renamable $x6, killed renamable $x5
79    renamable $x13 = ADDW killed renamable $x7, killed renamable $x28
80    renamable $x11 = ADDW killed renamable $x11, killed renamable $x13
81    renamable $x6 = ADDW killed renamable $x11, killed renamable $x29
82    SW renamable $x14, renamable $x15, 0 :: (store (s32))
83    SW renamable $x14, renamable $x15, 8 :: (store (s32))
84    SW renamable $x14, renamable $x15, 16 :: (store (s32))
85    SW renamable $x14, renamable $x15, 24 :: (store (s32))
86    PseudoRET
87...
88