aco: add ra test for hi v_interp_p2_f16

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28435>
This commit is contained in:
Georg Lehmann
2024-04-06 11:41:21 +02:00
committed by Marge Bot
parent e2cb9c57a2
commit 702f40f415
+20
View File
@@ -266,6 +266,26 @@ BEGIN_TEST(regalloc.branch_def_phis_at_branch_block)
finish_ra_test(ra_test_policy());
END_TEST
BEGIN_TEST(regalloc.vintrp_fp16)
//>> v1: %in0:v[0], s1: %in1:s[0], v1: %in2:v[1] = p_startpgm
if (!setup_cs("v1 s1 v1", GFX10))
return;
//! s1: %npm:m0 = p_parallelcopy %in1:s[0]
//! v2b: %lo:v[2][0:16] = v_interp_p2_f16 %in0:v[0], %npm:m0, %in2:v[1] attr0.x
Temp lo = bld.vintrp(aco_opcode::v_interp_p2_f16, bld.def(v2b), inputs[0], bld.m0(inputs[1]),
inputs[2], 0, 0, false);
//! v2b: %hi:v[2][16:32] = v_interp_p2_hi_f16 %in0:v[0], %npm:m0, %in2:v[1] attr0.x high
Temp hi = bld.vintrp(aco_opcode::v_interp_p2_f16, bld.def(v2b), inputs[0], bld.m0(inputs[1]),
inputs[2], 0, 0, true);
//! v1: %res:v[2] = p_create_vector %lo:v[2][0:16], %hi:v[2][16:32]
Temp res = bld.pseudo(aco_opcode::p_create_vector, bld.def(v1), lo, hi);
//! p_unit_test %res:v[2]
bld.pseudo(aco_opcode::p_unit_test, res);
finish_ra_test(ra_test_policy());
END_TEST
BEGIN_TEST(regalloc.vinterp_fp16)
//>> v1: %in0:v[0], v1: %in1:v[1], v1: %in2:v[2] = p_startpgm
if (!setup_cs("v1 v1 v1", GFX11))