83 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -verify-machineinstrs -run-pass post-RA-hazard-rec %s -o - | FileCheck -check-prefix=GCN %s3 4# WAVE_BARRIER and SI_MASKED_UNREACHABLE ect. are not really instructions. To5# fix the hazard (m0 def followed by V_INTERP), the compiler should insert a6# S_NOP.7 8---9name: hazard_wave_barrier10tracksRegLiveness: true11body: |12 bb.0:13 liveins: $sgpr014 15 ; GCN-LABEL: name: hazard_wave_barrier16 ; GCN: liveins: $sgpr017 ; GCN-NEXT: {{ $}}18 ; GCN-NEXT: $m0 = S_MOV_B32 killed renamable $sgpr019 ; GCN-NEXT: WAVE_BARRIER20 ; GCN-NEXT: S_NOP 021 ; GCN-NEXT: renamable $vgpr0 = V_INTERP_MOV_F32 2, 0, 0, implicit $mode, implicit $m0, implicit $exec22 ; GCN-NEXT: renamable $sgpr1 = S_MOV_B32 023 ; GCN-NEXT: S_ENDPGM 024 $m0 = S_MOV_B32 killed renamable $sgpr025 WAVE_BARRIER26 renamable $vgpr0 = V_INTERP_MOV_F32 2, 0, 0, implicit $mode, implicit $m0, implicit $exec27 renamable $sgpr1 = S_MOV_B32 028 S_ENDPGM 029 30...31 32---33name: hazard-masked-unreachable34tracksRegLiveness: true35body: |36 ; GCN-LABEL: name: hazard-masked-unreachable37 ; GCN: bb.0:38 ; GCN-NEXT: successors: %bb.1(0x80000000)39 ; GCN-NEXT: liveins: $sgpr040 ; GCN-NEXT: {{ $}}41 ; GCN-NEXT: $m0 = S_MOV_B32 killed renamable $sgpr042 ; GCN-NEXT: SI_MASKED_UNREACHABLE43 ; GCN-NEXT: S_NOP 044 ; GCN-NEXT: renamable $vgpr0 = V_INTERP_MOV_F32 2, 0, 0, implicit $mode, implicit $m0, implicit $exec45 ; GCN-NEXT: renamable $sgpr1 = S_MOV_B32 046 ; GCN-NEXT: {{ $}}47 ; GCN-NEXT: bb.1:48 ; GCN-NEXT: S_ENDPGM 049 bb.0:50 liveins: $sgpr051 52 $m0 = S_MOV_B32 killed renamable $sgpr053 SI_MASKED_UNREACHABLE54 renamable $vgpr0 = V_INTERP_MOV_F32 2, 0, 0, implicit $mode, implicit $m0, implicit $exec55 renamable $sgpr1 = S_MOV_B32 056 bb.1:57 S_ENDPGM 058...59 60---61name: hazard_sched_barrier62tracksRegLiveness: true63body: |64 bb.0:65 liveins: $sgpr066 67 ; GCN-LABEL: name: hazard_sched_barrier68 ; GCN: liveins: $sgpr069 ; GCN-NEXT: {{ $}}70 ; GCN-NEXT: $m0 = S_MOV_B32 killed renamable $sgpr071 ; GCN-NEXT: SCHED_BARRIER 072 ; GCN-NEXT: S_NOP 073 ; GCN-NEXT: renamable $vgpr0 = V_INTERP_MOV_F32 2, 0, 0, implicit $mode, implicit $m0, implicit $exec74 ; GCN-NEXT: renamable $sgpr1 = S_MOV_B32 075 ; GCN-NEXT: S_ENDPGM 076 $m0 = S_MOV_B32 killed renamable $sgpr077 SCHED_BARRIER 078 renamable $vgpr0 = V_INTERP_MOV_F32 2, 0, 0, implicit $mode, implicit $m0, implicit $exec79 renamable $sgpr1 = S_MOV_B32 080 S_ENDPGM 081 82...83