pan/bi: Fix out of range access in bi_instr_replicates
For replicates, we were checking equivalence between two sources on some
instructions but some of them only had one source causing an out of
bound access and check against unrelated data.
Instead we now always return true for those instructions.
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: f7d44a46cd ("pan/bi: Optimize replication")
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33867>
This commit is contained in:
committed by
Marge Bot
parent
01ec34fe57
commit
8948b74955
@@ -213,16 +213,18 @@ bi_instr_replicates(bi_instr *I, BITSET_WORD *replicates_16)
|
||||
* sources are identical. Check this case first.
|
||||
*/
|
||||
case BI_OPCODE_MKVEC_V2I16:
|
||||
case BI_OPCODE_V2F32_TO_V2F16:
|
||||
return bi_is_value_equiv(I->src[0], I->src[1]);
|
||||
|
||||
case BI_OPCODE_V2F16_TO_V2S16:
|
||||
case BI_OPCODE_V2F16_TO_V2U16:
|
||||
case BI_OPCODE_V2F32_TO_V2F16:
|
||||
case BI_OPCODE_V2S16_TO_V2F16:
|
||||
case BI_OPCODE_V2S8_TO_V2F16:
|
||||
case BI_OPCODE_V2S8_TO_V2S16:
|
||||
case BI_OPCODE_V2U16_TO_V2F16:
|
||||
case BI_OPCODE_V2U8_TO_V2F16:
|
||||
case BI_OPCODE_V2U8_TO_V2U16:
|
||||
return bi_is_value_equiv(I->src[0], I->src[1]);
|
||||
return true;
|
||||
|
||||
/* 16-bit transcendentals are defined to output zero in their
|
||||
* upper half, so they do not replicate
|
||||
|
||||
Reference in New Issue
Block a user