mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 07:10:15 +01:00
r300: Also consider ALU condition modifiers for loop DCE.
Since we typically use an ALU op to set the condition modifier for the IF-BRK-ENDIF, we were particularly likely to remove the increment of the loop counter! Cc: mesa-stable Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14117>
This commit is contained in:
parent
d6fed4ab7d
commit
26b3e2f7cd
1 changed files with 7 additions and 2 deletions
|
|
@ -253,8 +253,13 @@ void rc_dataflow_deadcode(struct radeon_compiler * c, void *user)
|
|||
if(opcode->HasDstReg){
|
||||
int src = 0;
|
||||
unsigned int srcmasks[3];
|
||||
rc_compute_sources_for_writemask(ptr,
|
||||
ptr->U.I.DstReg.WriteMask, srcmasks);
|
||||
unsigned int writemask = ptr->U.I.DstReg.WriteMask;
|
||||
if (ptr->U.I.WriteALUResult == RC_ALURESULT_X)
|
||||
writemask |= RC_MASK_X;
|
||||
else if (ptr->U.I.WriteALUResult == RC_ALURESULT_W)
|
||||
writemask |= RC_MASK_W;
|
||||
|
||||
rc_compute_sources_for_writemask(ptr, writemask, srcmasks);
|
||||
for(src=0; src < opcode->NumSrcRegs; src++){
|
||||
mark_used(&s,
|
||||
ptr->U.I.SrcReg[src].File,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue