mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
aco/ra: Fix counting of subdword variables in get_reg_create_vector
The loop variable "k" shadowed another variable in the outer scope, so this loop had no actual effect. Fixes:52cc1f8237("aco: improve p_create_vector RA for sub-dword operands") Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7427> (cherry picked from commit456beb40b8)
This commit is contained in:
parent
a37b964ec1
commit
aa35378aeb
2 changed files with 2 additions and 2 deletions
|
|
@ -4198,7 +4198,7 @@
|
|||
"description": "aco/ra: Fix counting of subdword variables in get_reg_create_vector",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "52cc1f8237d9ed0042578777af4b28e5b33c6354"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1349,7 +1349,7 @@ PhysReg get_reg_create_vector(ra_ctx& ctx,
|
|||
PhysReg reg;
|
||||
reg.reg_b = j * 4;
|
||||
unsigned bytes_left = bytes - (j - reg_lo) * 4;
|
||||
for (unsigned k = 0; k < MIN2(bytes_left, 4); k++, reg.reg_b++)
|
||||
for (unsigned byte_idx = 0; byte_idx < MIN2(bytes_left, 4); byte_idx++, reg.reg_b++)
|
||||
k += reg_file.test(reg, 1);
|
||||
} else {
|
||||
k += 4;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue