1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -verify-machineinstrs -run-pass post-RA-hazard-rec %s -o - | FileCheck -check-prefix=GCN %s
4 # WAVE_BARRIER and SI_MASKED_UNREACHABLE ect. are not really instructions. To
5 # fix the hazard (m0 def followed by V_INTERP), the compiler should insert a
9 name: hazard_wave_barrier
10 tracksRegLiveness: true
15 ; GCN-LABEL: name: hazard_wave_barrier
16 ; GCN: liveins: $sgpr0
18 ; GCN-NEXT: $m0 = S_MOV_B32 killed renamable $sgpr0
19 ; GCN-NEXT: WAVE_BARRIER
21 ; GCN-NEXT: renamable $vgpr0 = V_INTERP_MOV_F32 2, 0, 0, implicit $mode, implicit $m0, implicit $exec
22 ; GCN-NEXT: renamable $sgpr1 = S_MOV_B32 0
23 ; GCN-NEXT: S_ENDPGM 0
24 $m0 = S_MOV_B32 killed renamable $sgpr0
26 renamable $vgpr0 = V_INTERP_MOV_F32 2, 0, 0, implicit $mode, implicit $m0, implicit $exec
27 renamable $sgpr1 = S_MOV_B32 0
33 name: hazard-masked-unreachable
34 tracksRegLiveness: true
36 ; GCN-LABEL: name: hazard-masked-unreachable
38 ; GCN-NEXT: successors: %bb.1(0x80000000)
39 ; GCN-NEXT: liveins: $sgpr0
41 ; GCN-NEXT: $m0 = S_MOV_B32 killed renamable $sgpr0
42 ; GCN-NEXT: SI_MASKED_UNREACHABLE
44 ; GCN-NEXT: renamable $vgpr0 = V_INTERP_MOV_F32 2, 0, 0, implicit $mode, implicit $m0, implicit $exec
45 ; GCN-NEXT: renamable $sgpr1 = S_MOV_B32 0
48 ; GCN-NEXT: S_ENDPGM 0
52 $m0 = S_MOV_B32 killed renamable $sgpr0
54 renamable $vgpr0 = V_INTERP_MOV_F32 2, 0, 0, implicit $mode, implicit $m0, implicit $exec
55 renamable $sgpr1 = S_MOV_B32 0
61 name: hazard_sched_barrier
62 tracksRegLiveness: true
67 ; GCN-LABEL: name: hazard_sched_barrier
68 ; GCN: liveins: $sgpr0
70 ; GCN-NEXT: $m0 = S_MOV_B32 killed renamable $sgpr0
71 ; GCN-NEXT: SCHED_BARRIER 0
73 ; GCN-NEXT: renamable $vgpr0 = V_INTERP_MOV_F32 2, 0, 0, implicit $mode, implicit $m0, implicit $exec
74 ; GCN-NEXT: renamable $sgpr1 = S_MOV_B32 0
75 ; GCN-NEXT: S_ENDPGM 0
76 $m0 = S_MOV_B32 killed renamable $sgpr0
78 renamable $vgpr0 = V_INTERP_MOV_F32 2, 0, 0, implicit $mode, implicit $m0, implicit $exec
79 renamable $sgpr1 = S_MOV_B32 0