aco: Don't accept constants on p_bpermute.
authorTimur Kristóf <timur.kristof@gmail.com>
Tue, 13 Dec 2022 09:45:48 +0000 (10:45 +0100)
committerMarge Bot <emma+marge@anholt.net>
Wed, 14 Dec 2022 13:54:04 +0000 (13:54 +0000)
The sequence emitted for this pseudo instruction is not ready
to handle constants or literals at all.

Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20293>

src/amd/compiler/aco_optimizer.cpp

index abf3e92..0952ace 100644 (file)
@@ -673,6 +673,7 @@ alu_can_accept_constant(aco_opcode opcode, unsigned operand)
    case aco_opcode::v_readfirstlane_b32:
    case aco_opcode::p_extract:
    case aco_opcode::p_insert: return operand != 0;
+   case aco_opcode::p_bpermute:
    case aco_opcode::p_interp_gfx11:
    case aco_opcode::p_dual_src_export_gfx11: return false;
    default: return true;