Skip to content

Commit ecf8818

Browse files
authored
[AMDGPU] Presubmit test: max register pressure on defs. (#74424)
Upcoming patch #74422.
1 parent 600c129 commit ecf8818

File tree

1 file changed

+113
-2
lines changed

1 file changed

+113
-2
lines changed

llvm/test/CodeGen/AMDGPU/regpressure_printer.mir

Lines changed: 113 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 3
2-
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 --filetype=null --run-pass=amdgpu-print-rp %s 2>&1 >/dev/null | FileCheck %s --check-prefix=RP --check-prefix=RPU
3-
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 --filetype=null --run-pass=amdgpu-print-rp -amdgpu-print-rp-downward %s 2>&1 >/dev/null | FileCheck %s --check-prefix=RP --check-prefix=RPD
2+
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 --filetype=null -verify-machineinstrs --run-pass=amdgpu-print-rp %s 2>&1 >/dev/null | FileCheck %s --check-prefix=RP --check-prefix=RPU
3+
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 --filetype=null -verify-machineinstrs --run-pass=amdgpu-print-rp -amdgpu-print-rp-downward %s 2>&1 >/dev/null | FileCheck %s --check-prefix=RP --check-prefix=RPD
44

55

66
---
@@ -666,3 +666,114 @@ body: |
666666
EXP_DONE 0, %49:vgpr_32, undef %51:vgpr_32, undef %53:vgpr_32, undef %55:vgpr_32, -1, 0, 1, implicit $exec
667667
S_ENDPGM 0
668668
...
669+
---
670+
name: test_partially_used_def
671+
tracksRegLiveness: true
672+
body: |
673+
bb.0:
674+
liveins: $sgpr0_sgpr1_sgpr2_sgpr3
675+
; RPU-LABEL: name: test_partially_used_def
676+
; RPU: Live-in:
677+
; RPU-NEXT: SGPR VGPR
678+
; RPU-NEXT: 0 0
679+
; RPU-NEXT: 4 0 %0:sgpr_128 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
680+
; RPU-NEXT: 4 0
681+
; RPU-NEXT: 4 0 %1:sgpr_128 = COPY %0:sgpr_128
682+
; RPU-NEXT: 1 0
683+
; RPU-NEXT: 1 0 S_NOP 0, implicit %1.sub1:sgpr_128
684+
; RPU-NEXT: 0 0
685+
; RPU-NEXT: Live-out:
686+
; RPU-NEXT: Live-thr:
687+
; RPU-NEXT: 0 0
688+
;
689+
; RPD-LABEL: name: test_partially_used_def
690+
; RPD: Live-in:
691+
; RPD-NEXT: SGPR VGPR
692+
; RPD-NEXT: 0 0
693+
; RPD-NEXT: 4 0 %0:sgpr_128 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
694+
; RPD-NEXT: 4 0
695+
; RPD-NEXT: 8 0 %1:sgpr_128 = COPY %0:sgpr_128
696+
; RPD-NEXT: 1 0
697+
; RPD-NEXT: 1 0 S_NOP 0, implicit %1.sub1:sgpr_128
698+
; RPD-NEXT: 0 0
699+
; RPD-NEXT: Live-out:
700+
; RPD-NEXT: Live-thr:
701+
; RPD-NEXT: 0 0
702+
%0:sgpr_128 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
703+
%1:sgpr_128 = COPY %0:sgpr_128
704+
S_NOP 0, implicit %1.sub1
705+
...
706+
---
707+
name: test_partially_used_early_clobber_def
708+
tracksRegLiveness: true
709+
body: |
710+
bb.0:
711+
liveins: $sgpr0_sgpr1_sgpr2_sgpr3
712+
; RPU-LABEL: name: test_partially_used_early_clobber_def
713+
; RPU: Live-in:
714+
; RPU-NEXT: SGPR VGPR
715+
; RPU-NEXT: 0 0
716+
; RPU-NEXT: 4 0 %0:sgpr_128 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
717+
; RPU-NEXT: 4 0
718+
; RPU-NEXT: 5 0 early-clobber %1:sgpr_128 = COPY %0:sgpr_128
719+
; RPU-NEXT: 1 0
720+
; RPU-NEXT: 1 0 S_NOP 0, implicit %1.sub1:sgpr_128
721+
; RPU-NEXT: 0 0
722+
; RPU-NEXT: Live-out:
723+
; RPU-NEXT: Live-thr:
724+
; RPU-NEXT: 0 0
725+
;
726+
; RPD-LABEL: name: test_partially_used_early_clobber_def
727+
; RPD: Live-in:
728+
; RPD-NEXT: SGPR VGPR
729+
; RPD-NEXT: 0 0
730+
; RPD-NEXT: 4 0 %0:sgpr_128 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
731+
; RPD-NEXT: 4 0
732+
; RPD-NEXT: 8 0 early-clobber %1:sgpr_128 = COPY %0:sgpr_128
733+
; RPD-NEXT: 1 0
734+
; RPD-NEXT: 1 0 S_NOP 0, implicit %1.sub1:sgpr_128
735+
; RPD-NEXT: 0 0
736+
; RPD-NEXT: Live-out:
737+
; RPD-NEXT: Live-thr:
738+
; RPD-NEXT: 0 0
739+
%0:sgpr_128 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
740+
early-clobber %1:sgpr_128 = COPY %0:sgpr_128
741+
S_NOP 0, implicit %1.sub1
742+
...
743+
---
744+
name: test_partially_used_def_and_early_clobber_def
745+
tracksRegLiveness: true
746+
body: |
747+
bb.0:
748+
liveins: $sgpr0_sgpr1_sgpr2_sgpr3
749+
; RPU-LABEL: name: test_partially_used_def_and_early_clobber_def
750+
; RPU: Live-in:
751+
; RPU-NEXT: SGPR VGPR
752+
; RPU-NEXT: 0 0
753+
; RPU-NEXT: 4 0 %0:sgpr_128 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
754+
; RPU-NEXT: 4 0
755+
; RPU-NEXT: 7 0 %1:sgpr_128 = COPY %0:sgpr_128, implicit-def %2:sgpr_128, implicit-def early-clobber %3:sgpr_128, implicit-def dead early-clobber %4:sgpr_128
756+
; RPU-NEXT: 6 0
757+
; RPU-NEXT: 6 0 S_NOP 0, implicit %1.sub1:sgpr_128, implicit %2.sub0_sub1:sgpr_128, implicit %3.sub0_sub1_sub2:sgpr_128
758+
; RPU-NEXT: 0 0
759+
; RPU-NEXT: Live-out:
760+
; RPU-NEXT: Live-thr:
761+
; RPU-NEXT: 0 0
762+
;
763+
; RPD-LABEL: name: test_partially_used_def_and_early_clobber_def
764+
; RPD: Live-in:
765+
; RPD-NEXT: SGPR VGPR
766+
; RPD-NEXT: 0 0
767+
; RPD-NEXT: 4 0 %0:sgpr_128 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
768+
; RPD-NEXT: 4 0
769+
; RPD-NEXT: 20 0 %1:sgpr_128 = COPY %0:sgpr_128, implicit-def %2:sgpr_128, implicit-def early-clobber %3:sgpr_128, implicit-def dead early-clobber %4:sgpr_128
770+
; RPD-NEXT: 6 0
771+
; RPD-NEXT: 6 0 S_NOP 0, implicit %1.sub1:sgpr_128, implicit %2.sub0_sub1:sgpr_128, implicit %3.sub0_sub1_sub2:sgpr_128
772+
; RPD-NEXT: 0 0
773+
; RPD-NEXT: Live-out:
774+
; RPD-NEXT: Live-thr:
775+
; RPD-NEXT: 0 0
776+
%0:sgpr_128 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
777+
%1:sgpr_128 = COPY %0:sgpr_128, implicit-def %2:sgpr_128, implicit-def early-clobber %3:sgpr_128, implicit-def early-clobber %4:sgpr_128
778+
S_NOP 0, implicit %1.sub1, implicit %2.sub0_sub1, implicit %3.sub0_sub1_sub2
779+
...

0 commit comments

Comments
 (0)