aco/optimizer: use new helpers to apply literals
Foz-DB Navi21: Totals from 21009 (26.33% of 79789) affected shaders: MaxWaves: 495342 -> 495414 (+0.01%) Instrs: 22345587 -> 22335371 (-0.05%); split: -0.05%, +0.00% CodeSize: 122095820 -> 121795112 (-0.25%); split: -0.25%, +0.00% VGPRs: 1025800 -> 1025480 (-0.03%) Latency: 202876235 -> 203076272 (+0.10%); split: -0.04%, +0.14% InvThroughput: 47599930 -> 47596113 (-0.01%); split: -0.03%, +0.02% VClause: 475271 -> 475439 (+0.04%); split: -0.02%, +0.05% SClause: 700679 -> 700629 (-0.01%); split: -0.01%, +0.01% Copies: 1628498 -> 1618165 (-0.63%); split: -0.64%, +0.01% Branches: 567199 -> 567216 (+0.00%); split: -0.00%, +0.00% PreSGPRs: 952134 -> 952043 (-0.01%); split: -0.01%, +0.00% PreVGPRs: 846614 -> 846272 (-0.04%) VALU: 15572374 -> 15564050 (-0.05%); split: -0.05%, +0.00% SALU: 2423329 -> 2421319 (-0.08%); split: -0.08%, +0.00% Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Foz-DB Navi31: Totals from 13049 (16.44% of 79395) affected shaders: MaxWaves: 357242 -> 357268 (+0.01%) Instrs: 19955572 -> 19944106 (-0.06%); split: -0.06%, +0.00% CodeSize: 105689464 -> 105454348 (-0.22%); split: -0.23%, +0.00% VGPRs: 765744 -> 764952 (-0.10%); split: -0.11%, +0.00% Latency: 179063640 -> 179141591 (+0.04%); split: -0.02%, +0.07% InvThroughput: 27978134 -> 27971318 (-0.02%); split: -0.03%, +0.01% VClause: 386791 -> 386826 (+0.01%); split: -0.02%, +0.03% SClause: 598113 -> 598106 (-0.00%); split: -0.01%, +0.01% Copies: 1393111 -> 1383102 (-0.72%); split: -0.73%, +0.01% Branches: 498533 -> 498535 (+0.00%); split: -0.00%, +0.00% PreSGPRs: 573310 -> 573236 (-0.01%); split: -0.01%, +0.00% PreVGPRs: 591459 -> 591043 (-0.07%) VALU: 11623734 -> 11615755 (-0.07%); split: -0.07%, +0.00% SALU: 1962055 -> 1960005 (-0.10%); split: -0.11%, +0.00% VOPD: 3544 -> 3566 (+0.62%); split: +0.73%, -0.11% Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35272>
This commit is contained in:
@@ -1701,14 +1701,14 @@ BEGIN_TEST(optimize.fmamix_two_literals)
|
||||
|
||||
/* v_fma_mix_f32 is a fused mul/add, so it can't be used for precise separate mul/add. */
|
||||
//~gfx10! v1: (precise)%res3 = v_madak_f32 %a, %c15, 0x40400000
|
||||
//~gfx10_3! v1: (precise)%res3_tmp = v_mul_f32 %a, 0x3fc00000
|
||||
//~gfx10_3! v1: %res3 = v_add_f32 %res3_tmp, 0x40400000
|
||||
//~gfx10_3! v1: (precise)%res3_tmp = v_mul_f32 0x3fc00000, %a
|
||||
//~gfx10_3! v1: %res3 = v_add_f32 0x40400000, %res3_tmp
|
||||
//! p_unit_test 3, %res3
|
||||
writeout(3, fadd(bld.precise().vop2(aco_opcode::v_mul_f32, bld.def(v1), a, c15), c30));
|
||||
|
||||
//~gfx10! v1: (precise)%res4 = v_madak_f32 %1, %c16, 0x40400000
|
||||
//~gfx10_3! v1: %res4_tmp = v_mul_f32 %a, 0x3fc00000
|
||||
//~gfx10_3! v1: (precise)%res4 = v_add_f32 %res4_tmp, 0x40400000
|
||||
//~gfx10_3! v1: %res4_tmp = v_mul_f32 0x3fc00000, %a
|
||||
//~gfx10_3! v1: (precise)%res4 = v_add_f32 0x40400000, %res4_tmp
|
||||
//! p_unit_test 4, %res4
|
||||
writeout(4, bld.precise().vop2(aco_opcode::v_add_f32, bld.def(v1), fmul(a, c15), c30));
|
||||
|
||||
@@ -1743,9 +1743,9 @@ BEGIN_TEST(optimize.fmamix_two_literals)
|
||||
writeout(7, fma(c15, c30, c45));
|
||||
|
||||
/* Modifiers must be preserved. */
|
||||
//! v1: %res8 = v_fma_mix_f32 -%a, lo(0x44804200), hi(0x44804200)
|
||||
//! v1: %res8 = v_fma_mix_f32 |%a|, lo(0x44804200), hi(0x44804200)
|
||||
//! p_unit_test 8, %res8
|
||||
writeout(8, fma(fneg(a), c30, c45));
|
||||
writeout(8, fma(fabs(a), c30, c45));
|
||||
|
||||
//! v1: %res9 = v_fma_mix_f32 lo(0x44804200), |%a|, hi(0x44804200)
|
||||
//! p_unit_test 9, %res9
|
||||
@@ -2026,7 +2026,7 @@ BEGIN_TEST(optimizer.trans_inline_constant)
|
||||
//! p_unit_test 5, %res5
|
||||
writeout(5, bld.vop1(aco_opcode::v_rcp_f32, bld.def(v1), bld.copy(bld.def(s1), Operand::c32(0x3c00))));
|
||||
|
||||
//! v2b: %res6 = v_rcp_f16 0x3f800000
|
||||
//! v2b: %res6 = v_rcp_f16 0
|
||||
//! p_unit_test 6, %res6
|
||||
writeout(6, bld.vop1(aco_opcode::v_rcp_f16, bld.def(v2b), bld.copy(bld.def(s1), Operand::c32(0x3f800000))));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user