mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-09 05:48:18 +02:00
nir/opt_phi_precision: Fix bit size mismatch when moving widening conversions
Add a check to ensure that when load_const can be narrowed, the bit size from other widening conversion sources must be 16-bit to maintain consistency across all phi sources. Signed-off-by: jiajia Qian <jiajia.qian@nxp.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39773>
This commit is contained in:
parent
d42268f3e5
commit
f16d17a454
1 changed files with 3 additions and 0 deletions
|
|
@ -338,6 +338,9 @@ find_widening_op(nir_phi_instr *phi, unsigned *bit_size)
|
|||
if ((op == INVALID_OP) || !has_load_const)
|
||||
return op;
|
||||
|
||||
if (*bit_size != 16)
|
||||
return INVALID_OP;
|
||||
|
||||
/* If we could otherwise move widening sources, but load_const is
|
||||
* one of the phi sources (and does not have a widening conversion,
|
||||
* but could have a narrowing->widening sequence inserted without
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue