Skip to content

Commit b412d7d

Browse files
authored
[AMDGPU] gfx1250 min/max codegen tests. NFC. (#155292)
1 parent bb1cb6a commit b412d7d

File tree

10 files changed

+1072
-1
lines changed

10 files changed

+1072
-1
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2+
# RUN: llc -march=amdgcn -mcpu=gfx1250 -run-pass=instruction-select %s -o - | FileCheck -check-prefix=GCN %s
3+
4+
---
5+
name: smax_s64_sv
6+
legalized: true
7+
regBankSelected: true
8+
9+
body: |
10+
bb.0:
11+
liveins: $sgpr0_sgpr1, $vgpr2_vgpr3
12+
; GCN-LABEL: name: smax_s64_sv
13+
; GCN: liveins: $sgpr0_sgpr1, $vgpr2_vgpr3
14+
; GCN-NEXT: {{ $}}
15+
; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
16+
; GCN-NEXT: [[COPY1:%[0-9]+]]:vreg_64_align2 = COPY $vgpr2_vgpr3
17+
; GCN-NEXT: [[V_MAX_I64_e64_:%[0-9]+]]:vreg_64_align2 = V_MAX_I64_e64 [[COPY]], [[COPY1]], implicit $exec
18+
; GCN-NEXT: S_ENDPGM 0, implicit [[V_MAX_I64_e64_]]
19+
%0:sgpr(s64) = COPY $sgpr0_sgpr1
20+
%1:vgpr(s64) = COPY $vgpr2_vgpr3
21+
%2:vgpr(s64) = G_SMAX %0, %1
22+
S_ENDPGM 0, implicit %2
23+
...
24+
25+
---
26+
name: smax_s64_vs
27+
legalized: true
28+
regBankSelected: true
29+
30+
body: |
31+
bb.0:
32+
liveins: $vgpr0_vgpr1, $sgpr2_sgpr3
33+
; GCN-LABEL: name: smax_s64_vs
34+
; GCN: liveins: $vgpr0_vgpr1, $sgpr2_sgpr3
35+
; GCN-NEXT: {{ $}}
36+
; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $vgpr0_vgpr1
37+
; GCN-NEXT: [[COPY1:%[0-9]+]]:vreg_64_align2 = COPY $sgpr2_sgpr3
38+
; GCN-NEXT: [[V_MAX_I64_e64_:%[0-9]+]]:vreg_64_align2 = V_MAX_I64_e64 [[COPY]], [[COPY1]], implicit $exec
39+
; GCN-NEXT: S_ENDPGM 0, implicit [[V_MAX_I64_e64_]]
40+
%0:sgpr(s64) = COPY $vgpr0_vgpr1
41+
%1:vgpr(s64) = COPY $sgpr2_sgpr3
42+
%2:vgpr(s64) = G_SMAX %0, %1
43+
S_ENDPGM 0, implicit %2
44+
...
45+
46+
---
47+
name: smax_s64_vv
48+
legalized: true
49+
regBankSelected: true
50+
51+
body: |
52+
bb.0:
53+
liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
54+
; GCN-LABEL: name: smax_s64_vv
55+
; GCN: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
56+
; GCN-NEXT: {{ $}}
57+
; GCN-NEXT: [[COPY:%[0-9]+]]:vreg_64_align2 = COPY $vgpr0_vgpr1
58+
; GCN-NEXT: [[COPY1:%[0-9]+]]:vreg_64_align2 = COPY $vgpr2_vgpr3
59+
; GCN-NEXT: [[V_MAX_I64_e64_:%[0-9]+]]:vreg_64_align2 = V_MAX_I64_e64 [[COPY]], [[COPY1]], implicit $exec
60+
; GCN-NEXT: S_ENDPGM 0, implicit [[V_MAX_I64_e64_]]
61+
%0:vgpr(s64) = COPY $vgpr0_vgpr1
62+
%1:vgpr(s64) = COPY $vgpr2_vgpr3
63+
%2:vgpr(s64) = G_SMAX %0, %1
64+
S_ENDPGM 0, implicit %2
65+
...
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2+
# RUN: llc -march=amdgcn -mcpu=gfx1250 -run-pass=instruction-select %s -o - | FileCheck -check-prefix=GCN %s
3+
4+
---
5+
name: smin_s64_sv
6+
legalized: true
7+
regBankSelected: true
8+
9+
body: |
10+
bb.0:
11+
liveins: $sgpr0_sgpr1, $vgpr2_vgpr3
12+
; GCN-LABEL: name: smin_s64_sv
13+
; GCN: liveins: $sgpr0_sgpr1, $vgpr2_vgpr3
14+
; GCN-NEXT: {{ $}}
15+
; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
16+
; GCN-NEXT: [[COPY1:%[0-9]+]]:vreg_64_align2 = COPY $vgpr2_vgpr3
17+
; GCN-NEXT: [[V_MIN_I64_e64_:%[0-9]+]]:vreg_64_align2 = V_MIN_I64_e64 [[COPY]], [[COPY1]], implicit $exec
18+
; GCN-NEXT: S_ENDPGM 0, implicit [[V_MIN_I64_e64_]]
19+
%0:sgpr(s64) = COPY $sgpr0_sgpr1
20+
%1:vgpr(s64) = COPY $vgpr2_vgpr3
21+
%2:vgpr(s64) = G_SMIN %0, %1
22+
S_ENDPGM 0, implicit %2
23+
...
24+
25+
---
26+
name: smin_s64_vs
27+
legalized: true
28+
regBankSelected: true
29+
30+
body: |
31+
bb.0:
32+
liveins: $vgpr0_vgpr1, $sgpr2_sgpr3
33+
; GCN-LABEL: name: smin_s64_vs
34+
; GCN: liveins: $vgpr0_vgpr1, $sgpr2_sgpr3
35+
; GCN-NEXT: {{ $}}
36+
; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $vgpr0_vgpr1
37+
; GCN-NEXT: [[COPY1:%[0-9]+]]:vreg_64_align2 = COPY $sgpr2_sgpr3
38+
; GCN-NEXT: [[V_MIN_I64_e64_:%[0-9]+]]:vreg_64_align2 = V_MIN_I64_e64 [[COPY]], [[COPY1]], implicit $exec
39+
; GCN-NEXT: S_ENDPGM 0, implicit [[V_MIN_I64_e64_]]
40+
%0:sgpr(s64) = COPY $vgpr0_vgpr1
41+
%1:vgpr(s64) = COPY $sgpr2_sgpr3
42+
%2:vgpr(s64) = G_SMIN %0, %1
43+
S_ENDPGM 0, implicit %2
44+
...
45+
46+
---
47+
name: smin_s64_vv
48+
legalized: true
49+
regBankSelected: true
50+
51+
body: |
52+
bb.0:
53+
liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
54+
; GCN-LABEL: name: smin_s64_vv
55+
; GCN: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
56+
; GCN-NEXT: {{ $}}
57+
; GCN-NEXT: [[COPY:%[0-9]+]]:vreg_64_align2 = COPY $vgpr0_vgpr1
58+
; GCN-NEXT: [[COPY1:%[0-9]+]]:vreg_64_align2 = COPY $vgpr2_vgpr3
59+
; GCN-NEXT: [[V_MIN_I64_e64_:%[0-9]+]]:vreg_64_align2 = V_MIN_I64_e64 [[COPY]], [[COPY1]], implicit $exec
60+
; GCN-NEXT: S_ENDPGM 0, implicit [[V_MIN_I64_e64_]]
61+
%0:vgpr(s64) = COPY $vgpr0_vgpr1
62+
%1:vgpr(s64) = COPY $vgpr2_vgpr3
63+
%2:vgpr(s64) = G_SMIN %0, %1
64+
S_ENDPGM 0, implicit %2
65+
...

llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-smin.mir

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# RUN: llc -mtriple=amdgcn -mcpu=gfx900 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck -check-prefix=GCN %s
33
# RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck -check-prefix=GCN %s
44
# RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck -check-prefix=GCN %s
5+
# RUN: llc -mtriple=amdgcn -mcpu=gfx1250 -run-pass=instruction-select %s -o - | FileCheck -check-prefix=GCN %s
56

67
---
78
name: smin_s32_ss
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2+
# RUN: llc -march=amdgcn -mcpu=gfx1250 -run-pass=instruction-select %s -o - | FileCheck -check-prefix=GCN %s
3+
4+
---
5+
name: umax_s64_sv
6+
legalized: true
7+
regBankSelected: true
8+
9+
body: |
10+
bb.0:
11+
liveins: $sgpr0_sgpr1, $vgpr2_vgpr3
12+
; GCN-LABEL: name: umax_s64_sv
13+
; GCN: liveins: $sgpr0_sgpr1, $vgpr2_vgpr3
14+
; GCN-NEXT: {{ $}}
15+
; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
16+
; GCN-NEXT: [[COPY1:%[0-9]+]]:vreg_64_align2 = COPY $vgpr2_vgpr3
17+
; GCN-NEXT: [[V_MAX_U64_e64_:%[0-9]+]]:vreg_64_align2 = V_MAX_U64_e64 [[COPY]], [[COPY1]], implicit $exec
18+
; GCN-NEXT: S_ENDPGM 0, implicit [[V_MAX_U64_e64_]]
19+
%0:sgpr(s64) = COPY $sgpr0_sgpr1
20+
%1:vgpr(s64) = COPY $vgpr2_vgpr3
21+
%2:vgpr(s64) = G_UMAX %0, %1
22+
S_ENDPGM 0, implicit %2
23+
...
24+
25+
---
26+
name: umax_s64_vs
27+
legalized: true
28+
regBankSelected: true
29+
30+
body: |
31+
bb.0:
32+
liveins: $vgpr0_vgpr1, $sgpr2_sgpr3
33+
; GCN-LABEL: name: umax_s64_vs
34+
; GCN: liveins: $vgpr0_vgpr1, $sgpr2_sgpr3
35+
; GCN-NEXT: {{ $}}
36+
; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $vgpr0_vgpr1
37+
; GCN-NEXT: [[COPY1:%[0-9]+]]:vreg_64_align2 = COPY $sgpr2_sgpr3
38+
; GCN-NEXT: [[V_MAX_U64_e64_:%[0-9]+]]:vreg_64_align2 = V_MAX_U64_e64 [[COPY]], [[COPY1]], implicit $exec
39+
; GCN-NEXT: S_ENDPGM 0, implicit [[V_MAX_U64_e64_]]
40+
%0:sgpr(s64) = COPY $vgpr0_vgpr1
41+
%1:vgpr(s64) = COPY $sgpr2_sgpr3
42+
%2:vgpr(s64) = G_UMAX %0, %1
43+
S_ENDPGM 0, implicit %2
44+
...
45+
46+
---
47+
name: umax_s64_vv
48+
legalized: true
49+
regBankSelected: true
50+
51+
body: |
52+
bb.0:
53+
liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
54+
; GCN-LABEL: name: umax_s64_vv
55+
; GCN: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
56+
; GCN-NEXT: {{ $}}
57+
; GCN-NEXT: [[COPY:%[0-9]+]]:vreg_64_align2 = COPY $vgpr0_vgpr1
58+
; GCN-NEXT: [[COPY1:%[0-9]+]]:vreg_64_align2 = COPY $vgpr2_vgpr3
59+
; GCN-NEXT: [[V_MAX_U64_e64_:%[0-9]+]]:vreg_64_align2 = V_MAX_U64_e64 [[COPY]], [[COPY1]], implicit $exec
60+
; GCN-NEXT: S_ENDPGM 0, implicit [[V_MAX_U64_e64_]]
61+
%0:vgpr(s64) = COPY $vgpr0_vgpr1
62+
%1:vgpr(s64) = COPY $vgpr2_vgpr3
63+
%2:vgpr(s64) = G_UMAX %0, %1
64+
S_ENDPGM 0, implicit %2
65+
...
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2+
# RUN: llc -march=amdgcn -mcpu=gfx1250 -run-pass=instruction-select %s -o - | FileCheck -check-prefix=GCN %s
3+
4+
---
5+
name: umin_s64_sv
6+
legalized: true
7+
regBankSelected: true
8+
9+
body: |
10+
bb.0:
11+
liveins: $sgpr0_sgpr1, $vgpr2_vgpr3
12+
; GCN-LABEL: name: umin_s64_sv
13+
; GCN: liveins: $sgpr0_sgpr1, $vgpr2_vgpr3
14+
; GCN-NEXT: {{ $}}
15+
; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
16+
; GCN-NEXT: [[COPY1:%[0-9]+]]:vreg_64_align2 = COPY $vgpr2_vgpr3
17+
; GCN-NEXT: [[V_MIN_U64_e64_:%[0-9]+]]:vreg_64_align2 = V_MIN_U64_e64 [[COPY]], [[COPY1]], implicit $exec
18+
; GCN-NEXT: S_ENDPGM 0, implicit [[V_MIN_U64_e64_]]
19+
%0:sgpr(s64) = COPY $sgpr0_sgpr1
20+
%1:vgpr(s64) = COPY $vgpr2_vgpr3
21+
%2:vgpr(s64) = G_UMIN %0, %1
22+
S_ENDPGM 0, implicit %2
23+
...
24+
25+
---
26+
name: umin_s64_vs
27+
legalized: true
28+
regBankSelected: true
29+
30+
body: |
31+
bb.0:
32+
liveins: $vgpr0_vgpr1, $sgpr2_sgpr3
33+
; GCN-LABEL: name: umin_s64_vs
34+
; GCN: liveins: $vgpr0_vgpr1, $sgpr2_sgpr3
35+
; GCN-NEXT: {{ $}}
36+
; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $vgpr0_vgpr1
37+
; GCN-NEXT: [[COPY1:%[0-9]+]]:vreg_64_align2 = COPY $sgpr2_sgpr3
38+
; GCN-NEXT: [[V_MIN_U64_e64_:%[0-9]+]]:vreg_64_align2 = V_MIN_U64_e64 [[COPY]], [[COPY1]], implicit $exec
39+
; GCN-NEXT: S_ENDPGM 0, implicit [[V_MIN_U64_e64_]]
40+
%0:sgpr(s64) = COPY $vgpr0_vgpr1
41+
%1:vgpr(s64) = COPY $sgpr2_sgpr3
42+
%2:vgpr(s64) = G_UMIN %0, %1
43+
S_ENDPGM 0, implicit %2
44+
...
45+
46+
---
47+
name: umin_s64_vv
48+
legalized: true
49+
regBankSelected: true
50+
51+
body: |
52+
bb.0:
53+
liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
54+
; GCN-LABEL: name: umin_s64_vv
55+
; GCN: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
56+
; GCN-NEXT: {{ $}}
57+
; GCN-NEXT: [[COPY:%[0-9]+]]:vreg_64_align2 = COPY $vgpr0_vgpr1
58+
; GCN-NEXT: [[COPY1:%[0-9]+]]:vreg_64_align2 = COPY $vgpr2_vgpr3
59+
; GCN-NEXT: [[V_MIN_U64_e64_:%[0-9]+]]:vreg_64_align2 = V_MIN_U64_e64 [[COPY]], [[COPY1]], implicit $exec
60+
; GCN-NEXT: S_ENDPGM 0, implicit [[V_MIN_U64_e64_]]
61+
%0:vgpr(s64) = COPY $vgpr0_vgpr1
62+
%1:vgpr(s64) = COPY $vgpr2_vgpr3
63+
%2:vgpr(s64) = G_UMIN %0, %1
64+
S_ENDPGM 0, implicit %2
65+
...

0 commit comments

Comments
 (0)