mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 20:09:46 +00:00
AMDGPU: Skip all meta instructions in hazard recognizer
This was not adding a necessary nop due to thinking the kill counted.
This commit is contained in:
parent
532a3cd6c0
commit
cc5cc5b57a
@ -368,7 +368,7 @@ static int getWaitStatesSince(GCNHazardRecognizer::IsHazardFn IsHazard,
|
||||
if (IsHazard(&*I))
|
||||
return WaitStates;
|
||||
|
||||
if (I->isInlineAsm() || I->isImplicitDef() || I->isDebugInstr())
|
||||
if (I->isInlineAsm() || I->isMetaInstruction())
|
||||
continue;
|
||||
|
||||
WaitStates += SIInstrInfo::getNumWaitStates(*I);
|
||||
|
41
test/CodeGen/AMDGPU/hazard-recognizer-meta-insts.mir
Normal file
41
test/CodeGen/AMDGPU/hazard-recognizer-meta-insts.mir
Normal file
@ -0,0 +1,41 @@
|
||||
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
||||
# RUN: llc -march=amdgcn -mcpu=gfx906 -run-pass=post-RA-hazard-rec -o - %s | FileCheck -check-prefix=GFX9 %s
|
||||
|
||||
# Make sure the kill is skipped for hazard purposes, so the nop is
|
||||
# correctly inserted.
|
||||
|
||||
---
|
||||
|
||||
name: global_store_dwordx4_data_hazard_kill
|
||||
|
||||
body: |
|
||||
bb.0:
|
||||
liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5
|
||||
; GFX9-LABEL: name: global_store_dwordx4_data_hazard_kill
|
||||
; GFX9: GLOBAL_STORE_DWORDX4 $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5, 0, 0, 0, 0, implicit $exec
|
||||
; GFX9: $vgpr2 = KILL
|
||||
; GFX9: S_NOP 0
|
||||
; GFX9: $vgpr2 = V_MOV_B32_e32 0, implicit $exec
|
||||
GLOBAL_STORE_DWORDX4 $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4_vgpr5, 0, 0, 0, 0, implicit $exec
|
||||
$vgpr2 = KILL
|
||||
$vgpr2 = V_MOV_B32_e32 0, implicit $exec
|
||||
|
||||
...
|
||||
|
||||
---
|
||||
|
||||
name: global_store_dwordx3_data_hazard_kill
|
||||
|
||||
body: |
|
||||
bb.0:
|
||||
liveins: $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4
|
||||
; GFX9-LABEL: name: global_store_dwordx3_data_hazard_kill
|
||||
; GFX9: GLOBAL_STORE_DWORDX3 $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4, 0, 0, 0, 0, implicit $exec
|
||||
; GFX9: $vgpr2 = KILL
|
||||
; GFX9: S_NOP 0
|
||||
; GFX9: $vgpr2 = V_MOV_B32_e32 0, implicit $exec
|
||||
GLOBAL_STORE_DWORDX3 $vgpr0_vgpr1, $vgpr2_vgpr3_vgpr4, 0, 0, 0, 0, implicit $exec
|
||||
$vgpr2 = KILL
|
||||
$vgpr2 = V_MOV_B32_e32 0, implicit $exec
|
||||
|
||||
...
|
Loading…
Reference in New Issue
Block a user