-
Notifications
You must be signed in to change notification settings - Fork 12.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AMDGPU: Handle vcmpx+permalane gfx950 hazard
Confusingly, this is a different hazard to the one on gfx10 with a subtarget feature.
- Loading branch information
Showing
3 changed files
with
175 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
# RUN: llc -mtriple=amdgcn -mcpu=gfx950 -verify-machineinstrs -run-pass=post-RA-hazard-rec %s -o - | FileCheck -check-prefix=GCN %s | ||
|
||
--- | ||
# GCN-LABEL: name: vcmpx_vopc_write_exec_permlane16_swap_vop1 | ||
# GCN: V_CMPX_EQ_I32_e32 | ||
# GCN-NEXT: S_NOP 3 | ||
# GCN-NEXT: V_PERMLANE | ||
name: vcmpx_vopc_write_exec_permlane16_swap_vop1 | ||
body: | | ||
bb.0: | ||
liveins: $vgpr0, $vgpr1 | ||
V_CMPX_EQ_I32_e32 $vgpr0, $vgpr1, implicit-def $exec, implicit-def $vcc, implicit $exec | ||
renamable $vgpr0, renamable $vgpr1 = V_PERMLANE16_SWAP_B32_e32 killed $vgpr0, killed $vgpr1, implicit $exec | ||
... | ||
|
||
--- | ||
# GCN-LABEL: name: vcmpx_vop3_write_exec_permlane16_swap_vop1 | ||
# GCN: V_CMPX_EQ_I32_e64 | ||
# GCN-NEXT: S_NOP 3 | ||
# GCN-NEXT: V_PERMLANE | ||
name: vcmpx_vop3_write_exec_permlane16_swap_vop1 | ||
body: | | ||
bb.0: | ||
liveins: $vgpr0, $vgpr1 | ||
$exec = V_CMPX_EQ_I32_e64 $vgpr0, $vgpr1, implicit $exec | ||
renamable $vgpr0, renamable $vgpr1 = V_PERMLANE16_SWAP_B32_e32 killed $vgpr0, killed $vgpr1, implicit $exec | ||
... | ||
|
||
--- | ||
# GCN-LABEL: name: vcmpx_vopc_write_exec_permlane16_swap_vop3 | ||
# GCN: V_CMPX_EQ_I32_e32 | ||
# GCN-NEXT: S_NOP 3 | ||
# GCN-NEXT: V_PERMLANE | ||
name: vcmpx_vopc_write_exec_permlane16_swap_vop3 | ||
body: | | ||
bb.0: | ||
liveins: $vgpr0, $vgpr1 | ||
V_CMPX_EQ_I32_e32 $vgpr0, $vgpr1, implicit-def $exec, implicit-def $vcc, implicit $exec | ||
renamable $vgpr0, renamable $vgpr1 = V_PERMLANE16_SWAP_B32_e64 killed $vgpr0, killed $vgpr1, -1, 1, implicit $exec | ||
... | ||
|
||
--- | ||
# GCN-LABEL: name: vcmpx_vop3_write_exec_permlane16_swap_vop3 | ||
# GCN: V_CMPX_EQ_I32_e64 | ||
# GCN-NEXT: S_NOP 3 | ||
# GCN-NEXT: V_PERMLANE | ||
name: vcmpx_vop3_write_exec_permlane16_swap_vop3 | ||
body: | | ||
bb.0: | ||
liveins: $vgpr0, $vgpr1 | ||
$exec = V_CMPX_EQ_I32_e64 $vgpr0, $vgpr1, implicit $exec | ||
renamable $vgpr0, renamable $vgpr1 = V_PERMLANE16_SWAP_B32_e64 killed $vgpr0, killed $vgpr1, -1, 1, implicit $exec | ||
... | ||
|
||
--- | ||
# GCN-LABEL: name: vcmpx_vopc_write_exec_permlane32_swap_vop1 | ||
# GCN: V_CMPX_EQ_I32_e32 | ||
# GCN-NEXT: S_NOP 3 | ||
# GCN-NEXT: V_PERMLANE | ||
name: vcmpx_vopc_write_exec_permlane32_swap_vop1 | ||
body: | | ||
bb.0: | ||
liveins: $vgpr0, $vgpr1 | ||
V_CMPX_EQ_I32_e32 $vgpr0, $vgpr1, implicit-def $exec, implicit-def $vcc, implicit $exec | ||
renamable $vgpr0, renamable $vgpr1 = V_PERMLANE32_SWAP_B32_e32 killed $vgpr0, killed $vgpr1, implicit $exec | ||
... | ||
|
||
--- | ||
# GCN-LABEL: name: vcmpx_vop3_write_exec_permlane32_swap_vop1 | ||
# GCN: V_CMPX_EQ_I32_e64 | ||
# GCN-NEXT: S_NOP 3 | ||
# GCN-NEXT: V_PERMLANE | ||
name: vcmpx_vop3_write_exec_permlane32_swap_vop1 | ||
body: | | ||
bb.0: | ||
liveins: $vgpr0, $vgpr1 | ||
$exec = V_CMPX_EQ_I32_e64 $vgpr0, $vgpr1, implicit $exec | ||
renamable $vgpr0, renamable $vgpr1 = V_PERMLANE32_SWAP_B32_e32 killed $vgpr0, killed $vgpr1, implicit $exec | ||
... | ||
|
||
--- | ||
# GCN-LABEL: name: vcmpx_vopc_write_exec_permlane32_swap_vop3 | ||
# GCN: V_CMPX_EQ_I32_e32 | ||
# GCN-NEXT: S_NOP 3 | ||
# GCN-NEXT: V_PERMLANE | ||
name: vcmpx_vopc_write_exec_permlane32_swap_vop3 | ||
body: | | ||
bb.0: | ||
liveins: $vgpr0, $vgpr1 | ||
V_CMPX_EQ_I32_e32 $vgpr0, $vgpr1, implicit-def $exec, implicit-def $vcc, implicit $exec | ||
renamable $vgpr0, renamable $vgpr1 = V_PERMLANE32_SWAP_B32_e64 killed $vgpr0, killed $vgpr1, -1, 1, implicit $exec | ||
... | ||
|
||
--- | ||
# GCN-LABEL: name: vcmpx_vop3_write_exec_permlane32_swap_vop3 | ||
# GCN: V_CMPX_EQ_I32_e64 | ||
# GCN-NEXT: S_NOP 3 | ||
# GCN-NEXT: V_PERMLANE | ||
name: vcmpx_vop3_write_exec_permlane32_swap_vop3 | ||
body: | | ||
bb.0: | ||
liveins: $vgpr0, $vgpr1 | ||
$exec = V_CMPX_EQ_I32_e64 $vgpr0, $vgpr1, implicit $exec | ||
renamable $vgpr0, renamable $vgpr1 = V_PERMLANE32_SWAP_B32_e64 killed $vgpr0, killed $vgpr1, -1, 1, implicit $exec | ||
... | ||
|
||
--- | ||
# GCN-LABEL: name: vcmpx_vopc_write_exec_permlane16_swap_vop1__nowait | ||
# GCN: V_CMPX_EQ_I32_e32 | ||
# GCN-NEXT: V_MOV_B32 | ||
# GCN-NEXT: V_MOV_B32 | ||
# GCN-NEXT: V_MOV_B32 | ||
# GCN-NEXT: V_MOV_B32 | ||
# GCN-NEXT: V_PERMLANE | ||
name: vcmpx_vopc_write_exec_permlane16_swap_vop1__nowait | ||
body: | | ||
bb.0: | ||
liveins: $vgpr0, $vgpr1 | ||
V_CMPX_EQ_I32_e32 $vgpr0, $vgpr1, implicit-def $exec, implicit-def $vcc, implicit $exec | ||
$vgpr2 = V_MOV_B32_e32 0, implicit $exec | ||
$vgpr3 = V_MOV_B32_e32 0, implicit $exec | ||
$vgpr4 = V_MOV_B32_e32 0, implicit $exec | ||
$vgpr5 = V_MOV_B32_e32 0, implicit $exec | ||
renamable $vgpr0, renamable $vgpr1 = V_PERMLANE16_SWAP_B32_e32 killed $vgpr0, killed $vgpr1, implicit $exec | ||
... | ||
|
||
--- | ||
# GCN-LABEL: name: vcmpx_vopc_write_exec_permlane16_swap_vop1__wait1 | ||
# GCN: V_CMPX_EQ_I32_e32 | ||
# GCN-NEXT: V_MOV_B32 | ||
# GCN-NEXT: V_MOV_B32 | ||
# GCN-NEXT: V_MOV_B32 | ||
# GCN-NEXT: S_NOP 0 | ||
# GCN-NEXT: V_PERMLANE | ||
name: vcmpx_vopc_write_exec_permlane16_swap_vop1__wait1 | ||
body: | | ||
bb.0: | ||
liveins: $vgpr0, $vgpr1 | ||
V_CMPX_EQ_I32_e32 $vgpr0, $vgpr1, implicit-def $exec, implicit-def $vcc, implicit $exec | ||
$vgpr2 = V_MOV_B32_e32 0, implicit $exec | ||
$vgpr3 = V_MOV_B32_e32 0, implicit $exec | ||
$vgpr4 = V_MOV_B32_e32 0, implicit $exec | ||
renamable $vgpr0, renamable $vgpr1 = V_PERMLANE16_SWAP_B32_e32 killed $vgpr0, killed $vgpr1, implicit $exec | ||
... |