agx: add tests for sign/zero-extend propagate
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
This commit is contained in:
committed by
Marge Bot
parent
6d56c8bc02
commit
2c7635ab63
@@ -232,6 +232,39 @@ TEST_F(Optimizer, Copyprop)
|
||||
agx_fmul_to(b, out, wx, wy));
|
||||
}
|
||||
|
||||
TEST_F(Optimizer, SourceZeroExtend)
|
||||
{
|
||||
CASE32(
|
||||
{
|
||||
agx_index t = agx_temp(b->shader, AGX_SIZE_32);
|
||||
agx_mov_to(b, t, hy);
|
||||
agx_ffs_to(b, out, t);
|
||||
},
|
||||
agx_ffs_to(b, out, hy));
|
||||
}
|
||||
|
||||
TEST_F(Optimizer, AddSourceZeroExtend)
|
||||
{
|
||||
CASE32(
|
||||
{
|
||||
agx_index t = agx_temp(b->shader, AGX_SIZE_32);
|
||||
agx_mov_to(b, t, hy);
|
||||
agx_iadd_to(b, out, wx, t, 1);
|
||||
},
|
||||
agx_iadd_to(b, out, wx, agx_abs(hy), 1));
|
||||
}
|
||||
|
||||
TEST_F(Optimizer, AddSourceSignExtend)
|
||||
{
|
||||
CASE32(
|
||||
{
|
||||
agx_index t = agx_temp(b->shader, AGX_SIZE_32);
|
||||
agx_signext_to(b, t, hy);
|
||||
agx_iadd_to(b, out, wx, t, 1);
|
||||
},
|
||||
agx_iadd_to(b, out, wx, hy, 1));
|
||||
}
|
||||
|
||||
TEST_F(Optimizer, SubInlineImmediate)
|
||||
{
|
||||
CASE16(agx_iadd_to(b, out, hx, agx_mov_imm(b, 16, -2), 0),
|
||||
|
||||
Reference in New Issue
Block a user