agx: let if-fusing opts interact

total instructions in shared programs: 2115031 -> 2114800 (-0.01%)
instructions in affected programs: 46937 -> 46706 (-0.49%)
helped: 147
HURT: 30
Instructions are helped.

total alu in shared programs: 1669893 -> 1669655 (-0.01%)
alu in affected programs: 38134 -> 37896 (-0.62%)
helped: 147
HURT: 28
Alu are helped.

total fscib in shared programs: 1666017 -> 1665779 (-0.01%)
fscib in affected programs: 38134 -> 37896 (-0.62%)
helped: 147
HURT: 28
Fscib are helped.

total bytes in shared programs: 14059380 -> 14057364 (-0.01%)
bytes in affected programs: 306294 -> 304278 (-0.66%)
helped: 147
HURT: 28
Bytes are helped.

total regs in shared programs: 656483 -> 656491 (<.01%)
regs in affected programs: 257 -> 265 (3.11%)
helped: 3
HURT: 4
Inconclusive result (value mean confidence interval includes 0).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
This commit is contained in:
Alyssa Rosenzweig
2024-08-04 13:08:06 -04:00
parent 64239ac12c
commit c50e0934e7
2 changed files with 27 additions and 3 deletions
@@ -365,3 +365,27 @@ TEST_F(Optimizer, IfInverted)
1, AGX_ICOND_UEQ, false, NULL),
agx_if_icmp(b, hx, agx_zero(), 1, AGX_ICOND_UEQ, true, NULL));
}
TEST_F(Optimizer, IfInvertedCondition)
{
CASE_NO_RETURN(
agx_if_icmp(
b,
agx_xor(b, agx_icmp(b, wx, wy, AGX_ICOND_UEQ, true), agx_immediate(1)),
agx_zero(), 1, AGX_ICOND_UEQ, true, NULL),
agx_if_icmp(b, wx, wy, 1, AGX_ICOND_UEQ, false, NULL));
CASE_NO_RETURN(
agx_if_icmp(
b,
agx_xor(b, agx_fcmp(b, wx, wy, AGX_FCOND_EQ, true), agx_immediate(1)),
agx_zero(), 1, AGX_ICOND_UEQ, true, NULL),
agx_if_fcmp(b, wx, wy, 1, AGX_FCOND_EQ, false, NULL));
CASE_NO_RETURN(
agx_if_icmp(
b,
agx_xor(b, agx_fcmp(b, hx, hy, AGX_FCOND_LT, false), agx_immediate(1)),
agx_zero(), 1, AGX_ICOND_UEQ, true, NULL),
agx_if_fcmp(b, hx, hy, 1, AGX_FCOND_LT, true, NULL));
}