aco/ra: remove unnecessary check for duplicate precolored operands

An instruction can have at most one operand precolored to the same register.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31362>
This commit is contained in:
Daniel Schürmann 2024-09-30 16:48:08 +02:00 committed by Marge Bot
parent 9b2c4c4644
commit 19583023a2

View file

@ -2108,17 +2108,9 @@ handle_fixed_operands(ra_ctx& ctx, RegisterFile& register_file,
continue;
}
unsigned j;
bool found = false;
BITSET_FOREACH_SET (j, mask, i) {
if (instr->operands[j].tempId() == op.tempId() &&
instr->operands[j].physReg() == op.physReg()) {
found = true;
break;
}
}
if (found)
continue; /* the copy is already added to the list */
/* An instruction can have at most one operand precolored to the same register. */
assert(std::none_of(parallelcopy.begin(), parallelcopy.end(),
[&](auto copy) { return copy.second.physReg() == op.physReg(); }));
/* clear from register_file so fixed operands are not collected be collect_vars() */
tmp_file.clear(src, op.regClass()); // TODO: try to avoid moving block vars to src