mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 08:50:13 +01:00
pco: legalize between movs1/mbyp without emitting additional ops
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412>
This commit is contained in:
parent
e2d466f06c
commit
a201e21b4e
1 changed files with 8 additions and 0 deletions
|
|
@ -51,6 +51,14 @@ static inline bool ref_needs_olchk(pco_ref ref)
|
|||
*/
|
||||
static void insert_mov_ref(pco_instr *instr, pco_ref *ref, bool needs_s124)
|
||||
{
|
||||
if (instr->op == PCO_OP_MBYP && needs_s124 && !pco_ref_has_mods_set(*ref)) {
|
||||
instr->op = PCO_OP_MOVS1;
|
||||
return;
|
||||
} else if (instr->op == PCO_OP_MOVS1 && !needs_s124) {
|
||||
instr->op = PCO_OP_MBYP;
|
||||
return;
|
||||
}
|
||||
|
||||
assert(pco_ref_is_scalar(*ref));
|
||||
pco_ref new_ref = pco_ref_new_ssa(instr->parent_func,
|
||||
pco_ref_get_bits(*ref),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue