llvm.org GIT mirror llvm / master test / CodeGen / AMDGPU / vcmpx-exec-war-hazard.mir
master

Tree @master (Download .tar.gz)

vcmpx-exec-war-hazard.mir @masterraw · history · blame

# RUN: llc -march=amdgcn -mcpu=gfx1010 -mattr=-WavefrontSize32,+WavefrontSize64 -verify-machineinstrs -run-pass si-insert-skips,post-RA-hazard-rec -o - %s | FileCheck -check-prefix=GCN %s

# GCN-LABEL: name: hazard_vcmpx_smov_exec_lo
# GCN:      $sgpr0 = S_MOV_B32 $exec_lo
# GCN-NEXT: S_WAITCNT_DEPCTR 65534
# GCN-NEXT: V_CMPX_LE_F32_nosdst_e32
---
name:            hazard_vcmpx_smov_exec_lo
body:            |
  bb.0:
    successors: %bb.1
    $vgpr0 = V_MOV_B32_e32 0, implicit $exec
    $sgpr0 = S_MOV_B32 $exec_lo
    SI_KILL_F32_COND_IMM_TERMINATOR $vgpr0, 0, 3, implicit-def $exec, implicit-def $vcc, implicit-def $scc, implicit $exec
    S_BRANCH %bb.1

  bb.1:
    S_ENDPGM 0
...

# GCN-LABEL: name: hazard_vcmpx_smov_exec
# GCN:      $sgpr0_sgpr1 = S_MOV_B64 $exec
# GCN-NEXT: S_WAITCNT_DEPCTR 65534
# GCN-NEXT: V_CMPX_LE_F32_nosdst_e32
---
name:            hazard_vcmpx_smov_exec
body:            |
  bb.0:
    successors: %bb.1
    $vgpr0 = V_MOV_B32_e32 0, implicit $exec
    $sgpr0_sgpr1 = S_MOV_B64 $exec
    SI_KILL_F32_COND_IMM_TERMINATOR $vgpr0, 0, 3, implicit-def $exec, implicit-def $vcc, implicit-def $scc, implicit $exec
    S_BRANCH %bb.1

  bb.1:
    S_ENDPGM 0
...

# GCN-LABEL: name: no_hazard_vcmpx_vmov_exec_lo
# GCN:      $vgpr0 = V_MOV_B32_e32 $exec_lo, implicit $exec
# GCN-NEXT: V_CMPX_LE_F32_nosdst_e32
---
name:            no_hazard_vcmpx_vmov_exec_lo
body:            |
  bb.0:
    successors: %bb.1
    $vgpr0 = V_MOV_B32_e32 $exec_lo, implicit $exec
    SI_KILL_F32_COND_IMM_TERMINATOR $vgpr0, 0, 3, implicit-def $exec, implicit-def $vcc, implicit-def $scc, implicit $exec
    S_BRANCH %bb.1

  bb.1:
    S_ENDPGM 0
...

# GCN-LABEL: name: no_hazard_vcmpx_valu_impuse_exec
# GCN:      $vgpr0 = V_MOV_B32_e32 0, implicit $exec
# GCN-NEXT: V_CMPX_LE_F32_nosdst_e32
---
name:            no_hazard_vcmpx_valu_impuse_exec
body:            |
  bb.0:
    successors: %bb.1
    $vgpr0 = V_MOV_B32_e32 0, implicit $exec
    SI_KILL_F32_COND_IMM_TERMINATOR $vgpr0, 0, 3, implicit-def $exec, implicit-def $vcc, implicit-def $scc, implicit $exec
    S_BRANCH %bb.1

  bb.1:
    S_ENDPGM 0
...

# GCN-LABEL: name: no_hazard_vcmpx_smov_exec_lo_valu_writes_sgpr_imp
# GCN:      $sgpr0 = S_MOV_B32 $exec_lo
# GCN-NEXT: $vgpr0 = V_ADDC_U32_e32 0, $vgpr0, implicit-def $vcc, implicit $vcc, implicit $exec
# GCN-NEXT: V_CMPX_LE_F32_nosdst_e32
---
name:            no_hazard_vcmpx_smov_exec_lo_valu_writes_sgpr_imp
body:            |
  bb.0:
    successors: %bb.1
    $vgpr0 = V_MOV_B32_e32 0, implicit $exec
    $sgpr0 = S_MOV_B32 $exec_lo
    $vgpr0 = V_ADDC_U32_e32 0, $vgpr0, implicit-def $vcc, implicit $vcc, implicit $exec
    SI_KILL_F32_COND_IMM_TERMINATOR $vgpr0, 0, 3, implicit-def $exec, implicit-def $vcc, implicit-def $scc, implicit $exec
    S_BRANCH %bb.1

  bb.1:
    S_ENDPGM 0
...

# GCN-LABEL: name: no_hazard_vcmpx_smov_exec_lo_valu_writes_sgpr_exp
# GCN:      $sgpr0 = S_MOV_B32 $exec_lo
# GCN-NEXT: $sgpr0_sgpr1 = V_CMP_EQ_U32_e64 $vgpr0, 0, implicit $exec
# GCN-NEXT: V_CMPX_LE_F32_nosdst_e32
---
name:            no_hazard_vcmpx_smov_exec_lo_valu_writes_sgpr_exp
body:            |
  bb.0:
    successors: %bb.1
    $vgpr0 = V_MOV_B32_e32 0, implicit $exec
    $sgpr0 = S_MOV_B32 $exec_lo
    $sgpr0_sgpr1 = V_CMP_EQ_U32_e64 $vgpr0, 0, implicit $exec
    SI_KILL_F32_COND_IMM_TERMINATOR $vgpr0, 0, 3, implicit-def $exec, implicit-def $vcc, implicit-def $scc, implicit $exec
    S_BRANCH %bb.1

  bb.1:
    S_ENDPGM 0
...

# GCN-LABEL: name: no_hazard_vcmpx_smov_exec_lo_depctr_fffe
# GCN:      $sgpr0 = S_MOV_B32 $exec_lo
# GCN-NEXT: S_WAITCNT_DEPCTR 65534
# GCN-NEXT: V_CMPX_LE_F32_nosdst_e32
---
name:            no_hazard_vcmpx_smov_exec_lo_depctr_fffe
body:            |
  bb.0:
    successors: %bb.1
    $vgpr0 = V_MOV_B32_e32 0, implicit $exec
    $sgpr0 = S_MOV_B32 $exec_lo
    S_WAITCNT_DEPCTR 65534
    SI_KILL_F32_COND_IMM_TERMINATOR $vgpr0, 0, 3, implicit-def $exec, implicit-def $vcc, implicit-def $scc, implicit $exec
    S_BRANCH %bb.1

  bb.1:
    S_ENDPGM 0
...

# GCN-LABEL: name: no_hazard_vcmpx_smov_exec_lo_depctr_ffff
# GCN:      $sgpr0 = S_MOV_B32 $exec_lo
# GCN-NEXT: S_WAITCNT_DEPCTR 65535
# GCN-NEXT: V_CMPX_LE_F32_nosdst_e32
---
name:            no_hazard_vcmpx_smov_exec_lo_depctr_ffff
body:            |
  bb.0:
    successors: %bb.1
    $vgpr0 = V_MOV_B32_e32 0, implicit $exec
    $sgpr0 = S_MOV_B32 $exec_lo
    S_WAITCNT_DEPCTR 65535
    SI_KILL_F32_COND_IMM_TERMINATOR $vgpr0, 0, 3, implicit-def $exec, implicit-def $vcc, implicit-def $scc, implicit $exec
    S_BRANCH %bb.1

  bb.1:
    S_ENDPGM 0
...

# GCN-LABEL: name: hazard_vcmpx_smov_exec_lo_depctr_effe
# GCN:      $sgpr0 = S_MOV_B32 $exec_lo
# GCN:      S_WAITCNT_DEPCTR 65534
# GCN-NEXT: V_CMPX_LE_F32_nosdst_e32
---
name:            hazard_vcmpx_smov_exec_lo_depctr_effe
body:            |
  bb.0:
    successors: %bb.1
    $vgpr0 = V_MOV_B32_e32 0, implicit $exec
    $sgpr0 = S_MOV_B32 $exec_lo
    S_WAITCNT_DEPCTR 61438
    SI_KILL_F32_COND_IMM_TERMINATOR $vgpr0, 0, 3, implicit-def $exec, implicit-def $vcc, implicit-def $scc, implicit $exec
    S_BRANCH %bb.1

  bb.1:
    S_ENDPGM 0
...