11; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 
22
3- ; RUN: llc -mtriple=amdgcn < %s | FileCheck -check-prefix=GCN %s 
3+ ; RUN: llc -mtriple=amdgcn -mcpu=tahiti  < %s | FileCheck -check-prefix=GCN %s 
44; RUN: llc -mtriple=amdgcn -mcpu=tonga < %s | FileCheck -check-prefixes=VI %s 
55; RUN: llc -mtriple=amdgcn -mcpu=gfx900 < %s | FileCheck -check-prefixes=GFX9 %s 
66; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 < %s | FileCheck -check-prefixes=GFX11 %s 
@@ -92,10 +92,9 @@ define i16 @bitcast_f16_to_i16(half %a, i32 %b) {
9292; GCN-LABEL: bitcast_f16_to_i16: 
9393; GCN:       ; %bb.0: 
9494; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) 
95- ; GCN-NEXT:    v_mov_b32_e32  v2, v0 
95+ ; GCN-NEXT:    v_cvt_f16_f32_e32  v2, v0 
9696; GCN-NEXT:    v_mov_b32_e32 v0, 0 
9797; GCN-NEXT:    v_cmp_ne_u32_e32 vcc, 0, v1 
98- ; GCN-NEXT:    v_cvt_f16_f32_e32 v1, v2 
9998; GCN-NEXT:    s_and_saveexec_b64 s[4:5], vcc 
10099; GCN-NEXT:    s_xor_b64 s[4:5], exec, s[4:5] 
101100; GCN-NEXT:    s_cbranch_execnz .LBB1_3 
@@ -106,11 +105,11 @@ define i16 @bitcast_f16_to_i16(half %a, i32 %b) {
106105; GCN-NEXT:    s_or_b64 exec, exec, s[4:5] 
107106; GCN-NEXT:    s_setpc_b64 s[30:31] 
108107; GCN-NEXT:  .LBB1_3: ; %cmp.false 
109- ; GCN-NEXT:    v_mov_b32_e32 v0, v1  
108+ ; GCN-NEXT:    v_mov_b32_e32 v0, v2  
110109; GCN-NEXT:    s_andn2_saveexec_b64 s[4:5], s[4:5] 
111110; GCN-NEXT:    s_cbranch_execz .LBB1_2 
112111; GCN-NEXT:  .LBB1_4: ; %cmp.true 
113- ; GCN-NEXT:    v_cvt_f32_f16_e32 v0, v1  
112+ ; GCN-NEXT:    v_cvt_f32_f16_e32 v0, v2  
114113; GCN-NEXT:    v_add_f32_e32 v0, 0x38000000, v0 
115114; GCN-NEXT:    v_cvt_f16_f32_e32 v0, v0 
116115; GCN-NEXT:    s_or_b64 exec, exec, s[4:5] 
@@ -182,10 +181,9 @@ define bfloat @bitcast_i16_to_bf16(i16 %a, i32 %b) {
182181; GCN-NEXT:    s_and_saveexec_b64 s[4:5], vcc 
183182; GCN-NEXT:    s_xor_b64 s[4:5], exec, s[4:5] 
184183; GCN-NEXT:    s_andn2_saveexec_b64 s[4:5], s[4:5] 
185- ; GCN-NEXT:    s_cbranch_execz .LBB2_2 
186184; GCN-NEXT:  ; %bb.1: ; %cmp.true 
187185; GCN-NEXT:    v_add_i32_e32 v0, vcc, 0x30000, v0 
188- ; GCN-NEXT:  .LBB2_2 : ; %end 
186+ ; GCN-NEXT:  ; %bb.2 : ; %end 
189187; GCN-NEXT:    s_or_b64 exec, exec, s[4:5] 
190188; GCN-NEXT:    s_setpc_b64 s[30:31] 
191189; 
@@ -361,8 +359,8 @@ define bfloat @bitcast_f16_to_bf16(half %a, i32 %b) {
361359; GCN-LABEL: bitcast_f16_to_bf16: 
362360; GCN:       ; %bb.0: 
363361; GCN-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) 
362+ ; GCN-NEXT:    v_cvt_f16_f32_e32 v2, v0 
364363; GCN-NEXT:    v_cmp_ne_u32_e32 vcc, 0, v1 
365- ; GCN-NEXT:    v_cvt_f16_f32_e32 v1, v0 
366364; GCN-NEXT:    ; implicit-def: $vgpr0 
367365; GCN-NEXT:    s_and_saveexec_b64 s[4:5], vcc 
368366; GCN-NEXT:    s_xor_b64 s[4:5], exec, s[4:5] 
@@ -374,12 +372,12 @@ define bfloat @bitcast_f16_to_bf16(half %a, i32 %b) {
374372; GCN-NEXT:    s_or_b64 exec, exec, s[4:5] 
375373; GCN-NEXT:    s_setpc_b64 s[30:31] 
376374; GCN-NEXT:  .LBB4_3: ; %cmp.false 
377- ; GCN-NEXT:    v_lshlrev_b32_e32 v0, 16, v1  
378- ; GCN-NEXT:    ; implicit-def: $vgpr1  
375+ ; GCN-NEXT:    v_lshlrev_b32_e32 v0, 16, v2  
376+ ; GCN-NEXT:    ; implicit-def: $vgpr2  
379377; GCN-NEXT:    s_andn2_saveexec_b64 s[4:5], s[4:5] 
380378; GCN-NEXT:    s_cbranch_execz .LBB4_2 
381379; GCN-NEXT:  .LBB4_4: ; %cmp.true 
382- ; GCN-NEXT:    v_cvt_f32_f16_e32 v0, v1  
380+ ; GCN-NEXT:    v_cvt_f32_f16_e32 v0, v2  
383381; GCN-NEXT:    v_add_f32_e32 v0, 0x38000000, v0 
384382; GCN-NEXT:    v_cvt_f16_f32_e32 v0, v0 
385383; GCN-NEXT:    v_lshlrev_b32_e32 v0, 16, v0 
0 commit comments