mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-30 02:51:24 +00: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
@ -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…
Reference in New Issue
Block a user