From e3cbb0eb6a7b998f33d5175274fd3a4bf4fd5973 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 19 Oct 2021 14:01:45 +0200 Subject: [PATCH] aco: fix invalid IR generated for b2f64 when the dest is a VGPR Fixes few 64-bit piglit tests with Zink. Cc: 21.3 mesa-stable Signed-off-by: Samuel Pitoiset Reviewed-by: Rhys Perry Part-of: --- src/amd/compiler/aco_instruction_selection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 1ace1605172..743fed4a7d8 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -3038,7 +3038,7 @@ visit_alu_instr(isel_context* ctx, nir_alu_instr* instr) bld.sop2(aco_opcode::s_cselect_b64, Definition(dst), Operand::c32(0x3f800000u), Operand::zero(), bld.scc(src)); } else if (dst.regClass() == v2) { - Temp one = bld.copy(bld.def(v2), Operand::c32(0x3FF00000u)); + Temp one = bld.copy(bld.def(v1), Operand::c32(0x3FF00000u)); Temp upper = bld.vop2_e64(aco_opcode::v_cndmask_b32, bld.def(v1), Operand::zero(), one, src); bld.pseudo(aco_opcode::p_create_vector, Definition(dst), Operand::zero(), upper);