1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn -mcpu=gfx900 -run-pass=instruction-select -global-isel-abort=2 -pass-remarks-missed='gisel*' -verify-machineinstrs %s -o - 2>%t | FileCheck -check-prefix=GFX9 %s
3 # RUN: FileCheck -check-prefixes=ERR-GFX910,ERR %s < %t
5 # RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -run-pass=instruction-select -global-isel-abort=2 -pass-remarks-missed='gisel*' -verify-machineinstrs %s -o - 2>%t | FileCheck -check-prefix=GFX10 %s
6 # RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -run-pass=instruction-select -global-isel-abort=2 -pass-remarks-missed='gisel*' -verify-machineinstrs %s -o - 2>%t | FileCheck -check-prefix=GFX10 %s
7 # RUN: FileCheck -check-prefixes=ERR-GFX910,ERR %s < %t
10 # ERR-GFX910: remark: <unknown>:0:0: cannot select: %2:sgpr(<2 x s16>) = G_ASHR %0:sgpr, %1:sgpr(<2 x s16>) (in function: ashr_v2s16_ss)
20 liveins: $sgpr0, $sgpr1
21 ; GFX9-LABEL: name: ashr_v2s16_ss
22 ; GFX9: liveins: $sgpr0, $sgpr1
24 ; GFX9-NEXT: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
25 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr1
26 ; GFX9-NEXT: [[ASHR:%[0-9]+]]:sgpr(<2 x s16>) = G_ASHR [[COPY]], [[COPY1]](<2 x s16>)
27 ; GFX9-NEXT: S_ENDPGM 0, implicit [[ASHR]](<2 x s16>)
28 ; GFX10-LABEL: name: ashr_v2s16_ss
29 ; GFX10: liveins: $sgpr0, $sgpr1
31 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
32 ; GFX10-NEXT: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr1
33 ; GFX10-NEXT: [[ASHR:%[0-9]+]]:sgpr(<2 x s16>) = G_ASHR [[COPY]], [[COPY1]](<2 x s16>)
34 ; GFX10-NEXT: S_ENDPGM 0, implicit [[ASHR]](<2 x s16>)
35 %0:sgpr(<2 x s16>) = COPY $sgpr0
36 %1:sgpr(<2 x s16>) = COPY $sgpr1
37 %2:sgpr(<2 x s16>) = G_ASHR %0, %1
38 S_ENDPGM 0, implicit %2
48 liveins: $sgpr0, $vgpr0
49 ; GFX9-LABEL: name: ashr_v2s16_sv
50 ; GFX9: liveins: $sgpr0, $vgpr0
52 ; GFX9-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
53 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
54 ; GFX9-NEXT: [[V_PK_ASHRREV_I16_:%[0-9]+]]:vgpr_32 = V_PK_ASHRREV_I16 8, [[COPY1]], 8, [[COPY]], 0, 0, 0, 0, 0, implicit $exec
55 ; GFX9-NEXT: S_ENDPGM 0, implicit [[V_PK_ASHRREV_I16_]]
56 ; GFX10-LABEL: name: ashr_v2s16_sv
57 ; GFX10: liveins: $sgpr0, $vgpr0
59 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
60 ; GFX10-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
61 ; GFX10-NEXT: [[V_PK_ASHRREV_I16_:%[0-9]+]]:vgpr_32 = V_PK_ASHRREV_I16 8, [[COPY1]], 8, [[COPY]], 0, 0, 0, 0, 0, implicit $exec
62 ; GFX10-NEXT: S_ENDPGM 0, implicit [[V_PK_ASHRREV_I16_]]
63 %0:sgpr(<2 x s16>) = COPY $sgpr0
64 %1:vgpr(<2 x s16>) = COPY $vgpr0
65 %2:vgpr(<2 x s16>) = G_ASHR %0, %1
66 S_ENDPGM 0, implicit %2
76 liveins: $sgpr0, $vgpr0
77 ; GFX9-LABEL: name: ashr_v2s16_vs
78 ; GFX9: liveins: $sgpr0, $vgpr0
80 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
81 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0
82 ; GFX9-NEXT: [[V_PK_ASHRREV_I16_:%[0-9]+]]:vgpr_32 = V_PK_ASHRREV_I16 8, [[COPY1]], 8, [[COPY]], 0, 0, 0, 0, 0, implicit $exec
83 ; GFX9-NEXT: S_ENDPGM 0, implicit [[V_PK_ASHRREV_I16_]]
84 ; GFX10-LABEL: name: ashr_v2s16_vs
85 ; GFX10: liveins: $sgpr0, $vgpr0
87 ; GFX10-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
88 ; GFX10-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0
89 ; GFX10-NEXT: [[V_PK_ASHRREV_I16_:%[0-9]+]]:vgpr_32 = V_PK_ASHRREV_I16 8, [[COPY1]], 8, [[COPY]], 0, 0, 0, 0, 0, implicit $exec
90 ; GFX10-NEXT: S_ENDPGM 0, implicit [[V_PK_ASHRREV_I16_]]
91 %0:vgpr(<2 x s16>) = COPY $vgpr0
92 %1:sgpr(<2 x s16>) = COPY $sgpr0
93 %2:vgpr(<2 x s16>) = G_ASHR %0, %1
94 S_ENDPGM 0, implicit %2
100 regBankSelected: true
104 liveins: $vgpr0, $vgpr1
105 ; GFX9-LABEL: name: ashr_v2s16_vv
106 ; GFX9: liveins: $vgpr0, $vgpr1
108 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
109 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
110 ; GFX9-NEXT: [[V_PK_ASHRREV_I16_:%[0-9]+]]:vgpr_32 = V_PK_ASHRREV_I16 8, [[COPY1]], 8, [[COPY]], 0, 0, 0, 0, 0, implicit $exec
111 ; GFX9-NEXT: S_ENDPGM 0, implicit [[V_PK_ASHRREV_I16_]]
112 ; GFX10-LABEL: name: ashr_v2s16_vv
113 ; GFX10: liveins: $vgpr0, $vgpr1
115 ; GFX10-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
116 ; GFX10-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
117 ; GFX10-NEXT: [[V_PK_ASHRREV_I16_:%[0-9]+]]:vgpr_32 = V_PK_ASHRREV_I16 8, [[COPY1]], 8, [[COPY]], 0, 0, 0, 0, 0, implicit $exec
118 ; GFX10-NEXT: S_ENDPGM 0, implicit [[V_PK_ASHRREV_I16_]]
119 %0:vgpr(<2 x s16>) = COPY $vgpr0
120 %1:vgpr(<2 x s16>) = COPY $vgpr1
121 %2:vgpr(<2 x s16>) = G_ASHR %0, %1
122 S_ENDPGM 0, implicit %2