From feee5e697409e7fbece8c3f202ee93021d3be30f Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Fri, 13 Aug 2021 15:07:15 -0700 Subject: [PATCH] nir/tests: Fix transmuting an SSA dest to be non-SSA With the de-ralloc changes, having the register dest not have its .reg properly initialized caused crashes. Reviewed-by: Rhys Perry Part-of: --- src/compiler/nir/tests/negative_equal_tests.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/nir/tests/negative_equal_tests.cpp b/src/compiler/nir/tests/negative_equal_tests.cpp index ff9eeb27f40..17d341a73d0 100644 --- a/src/compiler/nir/tests/negative_equal_tests.cpp +++ b/src/compiler/nir/tests/negative_equal_tests.cpp @@ -306,7 +306,8 @@ TEST_F(alu_srcs_negative_equal_test, unused_components_mismatch) nir_alu_instr *instr = nir_instr_as_alu(result->parent_instr); /* Disable the channels that aren't negations of each other. */ - instr->dest.dest.is_ssa = false; + nir_register *reg = nir_local_reg_create(bld.impl); + nir_instr_rewrite_dest(&instr->instr, &instr->dest.dest, nir_dest_for_reg(reg)); instr->dest.write_mask = 8 + 1; EXPECT_TRUE(nir_alu_srcs_negative_equal(instr, instr, 0, 1));