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 <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13435>
This commit is contained in:
Samuel Pitoiset 2021-10-19 14:01:45 +02:00 committed by Marge Bot
parent 3df9d8ed80
commit e3cbb0eb6a
1 changed files with 1 additions and 1 deletions

View File

@ -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);