ir3/ra: Fix logic bug in compress_regs_left

If we're allocating a source then we force is_killed to false, not to
true. Fixes a regression in
dEQP-GLES31.functional.synchronization.in_invocation.image_atomic_write_read
later.

Fixes: 0ffcb19b9d ("ir3: Rewrite register allocation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14246>
(cherry picked from commit d371d807eb)
This commit is contained in:
Connor Abbott 2021-12-22 18:51:25 +01:00 committed by Eric Engestrom
parent 7241ec2ee5
commit d761347e05
2 changed files with 3 additions and 3 deletions

View file

@ -1264,7 +1264,7 @@
"description": "ir3/ra: Fix logic bug in compress_regs_left",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "0ffcb19b9d9fbe902224542047c389a661fbf816"
},

View file

@ -968,9 +968,9 @@ compress_regs_left(struct ra_ctx *ctx, struct ra_file *file, unsigned size,
assert(!interval->frozen);
/* Killed sources don't count because they go at the end and can
* overlap the register we're trying to add.
* overlap the register we're trying to add, unless it's a source.
*/
if (!interval->is_killed && !is_source) {
if (!interval->is_killed || is_source) {
removed_size += interval->physreg_end - interval->physreg_start;
if (interval->interval.reg->flags & IR3_REG_HALF) {
removed_half_size += interval->physreg_end -