aco: don't validate p_constaddr_addlo/p_resumeaddr_addlo operands
authorGeorg Lehmann <dadschoorse@gmail.com>
Mon, 12 Jun 2023 14:03:58 +0000 (16:03 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 12 Jun 2023 19:43:17 +0000 (19:43 +0000)
These can have two literals so validation would fail.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23507>

src/amd/compiler/aco_validate.cpp

index 142c42a..afb9896 100644 (file)
@@ -289,7 +289,9 @@ validate_ir(Program* program)
                      instr.get());
          }
 
-         if (instr->isSALU() || instr->isVALU()) {
+         if ((instr->isSALU() && instr->opcode != aco_opcode::p_constaddr_addlo &&
+              instr->opcode != aco_opcode::p_resumeaddr_addlo) ||
+             instr->isVALU()) {
             /* check literals */
             Operand literal(s1);
             for (unsigned i = 0; i < instr->operands.size(); i++) {