diff --git a/.pick_status.json b/.pick_status.json index 7da5555a8d5..7becc542c01 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2803,7 +2803,7 @@ "description": "aco: Fix integer overflows when emitting parallel copies during RA", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": null }, diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index ef733eb4cbc..8b3eacf238f 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -1905,11 +1905,11 @@ void register_allocation(Program *program, std::vector& live_out_per_bl if (!sgpr_operands_alias_defs) { unsigned reg = parallelcopy[i].first.physReg().reg(); unsigned size = parallelcopy[i].first.getTemp().size(); - sgpr_operands[reg / 64u] |= ((1u << size) - 1) << (reg % 64u); + sgpr_operands[reg / 64u] |= u_bit_consecutive64(reg % 64u, size); reg = parallelcopy[i].second.physReg().reg(); size = parallelcopy[i].second.getTemp().size(); - if (sgpr_operands[reg / 64u] & ((1u << size) - 1) << (reg % 64u)) + if (sgpr_operands[reg / 64u] & u_bit_consecutive64(reg % 64u, size)) sgpr_operands_alias_defs = true; } }