@@ -54,6 +54,72 @@ body: |
5454 %4:vgpr_16 = V_CVT_F16_U16_t16_e64 0, %3:sreg_32, 0, 0, 0, implicit $mode, implicit $exec
5555 ...
5656
57+ ---
58+ name : salu16_usedby_salu32
59+ body : |
60+ bb.0:
61+ ; GCN-LABEL: name: salu16_usedby_salu32
62+ ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
63+ ; GCN-NEXT: [[DEF1:%[0-9]+]]:sreg_32 = IMPLICIT_DEF
64+ ; GCN-NEXT: [[V_TRUNC_F16_t16_e64_:%[0-9]+]]:vgpr_16 = V_TRUNC_F16_t16_e64 0, [[DEF]].lo16, 0, 0, 0, implicit $mode, implicit $exec
65+ ; GCN-NEXT: [[DEF2:%[0-9]+]]:vgpr_16 = IMPLICIT_DEF
66+ ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vgpr_32 = REG_SEQUENCE [[V_TRUNC_F16_t16_e64_]], %subreg.lo16, [[DEF2]], %subreg.hi16
67+ ; GCN-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[REG_SEQUENCE]], [[DEF]], implicit $exec
68+ %0:vgpr_32 = IMPLICIT_DEF
69+ %1:sreg_32 = COPY %0:vgpr_32
70+ %2:sreg_32 = S_TRUNC_F16 %1:sreg_32, implicit $mode
71+ %3:sreg_32 = S_XOR_B32 %2:sreg_32, %1:sreg_32, implicit-def $scc
72+ ...
73+
74+ ---
75+ name : salu32_usedby_salu16
76+ body : |
77+ bb.0:
78+ ; GCN-LABEL: name: salu32_usedby_salu16
79+ ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
80+ ; GCN-NEXT: [[DEF1:%[0-9]+]]:sreg_32 = IMPLICIT_DEF
81+ ; GCN-NEXT: [[V_XOR_B32_e64_:%[0-9]+]]:vgpr_32 = V_XOR_B32_e64 [[DEF]], [[DEF]], implicit $exec
82+ ; GCN-NEXT: [[V_TRUNC_F16_t16_e64_:%[0-9]+]]:vgpr_16 = V_TRUNC_F16_t16_e64 0, [[V_XOR_B32_e64_]].lo16, 0, 0, 0, implicit $mode, implicit $exec
83+ %0:vgpr_32 = IMPLICIT_DEF
84+ %1:sreg_32 = COPY %0:vgpr_32
85+ %2:sreg_32 = S_XOR_B32 %1:sreg_32, %1:sreg_32, implicit-def $scc
86+ %3:sreg_32 = S_TRUNC_F16 %2:sreg_32, implicit $mode
87+ ...
88+
89+ ---
90+ name : sgpr16_to_spgr32
91+ body : |
92+ bb.0:
93+ ; GCN-LABEL: name: sgpr16_to_spgr32
94+ ; GCN: [[DEF:%[0-9]+]]:vgpr_16 = IMPLICIT_DEF
95+ ; GCN-NEXT: [[DEF1:%[0-9]+]]:sgpr_lo16 = IMPLICIT_DEF
96+ ; GCN-NEXT: [[SUBREG_TO_REG:%[0-9]+]]:vgpr_32 = SUBREG_TO_REG 0, [[DEF]], %subreg.lo16
97+ ; GCN-NEXT: [[SUBREG_TO_REG1:%[0-9]+]]:vgpr_32 = SUBREG_TO_REG 0, [[DEF]], %subreg.lo16
98+ ; GCN-NEXT: [[V_FMAC_F16_t16_e64_:%[0-9]+]]:vgpr_16 = V_FMAC_F16_t16_e64 0, [[SUBREG_TO_REG1]].lo16, 0, [[SUBREG_TO_REG1]].lo16, 0, [[SUBREG_TO_REG]].lo16, 0, 0, 0, implicit $mode, implicit $exec
99+ %0:vgpr_16 = IMPLICIT_DEF
100+ %1:sgpr_lo16 = COPY %0:vgpr_16
101+ %2:sreg_32 = COPY %0:vgpr_16
102+ %3:sreg_32 = COPY %1:sgpr_lo16
103+ %4:sreg_32 = S_FMAC_F16 %3:sreg_32, %3:sreg_32, %2:sreg_32, implicit $mode
104+ ...
105+
106+ ---
107+ name : sgpr32_to_spgr16
108+ body : |
109+ bb.0:
110+ ; GCN-LABEL: name: sgpr32_to_spgr16
111+ ; GCN: [[DEF:%[0-9]+]]:vgpr_16 = IMPLICIT_DEF
112+ ; GCN-NEXT: [[SUBREG_TO_REG:%[0-9]+]]:vgpr_32 = SUBREG_TO_REG 0, [[DEF]], %subreg.lo16
113+ ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_16 = COPY [[SUBREG_TO_REG]]
114+ ; GCN-NEXT: [[SUBREG_TO_REG1:%[0-9]+]]:vgpr_32 = SUBREG_TO_REG 0, [[COPY]], %subreg.lo16
115+ ; GCN-NEXT: [[V_FMAC_F16_t16_e64_:%[0-9]+]]:vgpr_16 = V_FMAC_F16_t16_e64 0, [[SUBREG_TO_REG1]].lo16, 0, [[SUBREG_TO_REG1]].lo16, 0, [[SUBREG_TO_REG]].lo16, 0, 0, 0, implicit $mode, implicit $exec
116+ %0:vgpr_16 = IMPLICIT_DEF
117+ %1:sreg_32 = COPY %0:vgpr_16
118+ %2:sgpr_lo16 = COPY %1:sreg_32
119+ %3:sreg_32 = COPY %2:sgpr_lo16
120+ %4:sreg_32 = S_FMAC_F16 %3:sreg_32, %3:sreg_32, %1:sreg_32, implicit $mode
121+ ...
122+
57123---
58124name : vgpr16_to_spgr32
59125body : |
0 commit comments