aco: Fix convert_to_SDWA when instruction has 3 operands.
authorTimur Kristóf <timur.kristof@gmail.com>
Sat, 22 Aug 2020 18:45:54 +0000 (20:45 +0200)
committerTimur Kristóf <timur.kristof@gmail.com>
Mon, 24 Aug 2020 13:55:14 +0000 (15:55 +0200)
commitf820dde201f82763b5165dfe6516f20e9c80795b
tree4ef97115020d3ec155658dc4a6b2aef2e9600e25
parent0d194a70c6497ea77bb57aa22e229c4fceabb653
aco: Fix convert_to_SDWA when instruction has 3 operands.

Previously, when the instruction had 3 operands, this would cause
possible corruption because of writing to sdwa->sel[2].
This was noticed thanks to GCC 10's -Wstringop-overflow warning.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6436>
src/amd/compiler/aco_ir.cpp