agx: fuse also 8-bit address math

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
This commit is contained in:
Alyssa Rosenzweig
2024-11-11 08:20:43 -04:00
committed by Marge Bot
parent 75d3c51e51
commit e145425746
+6
View File
@@ -288,6 +288,12 @@ for s_ in range(1, 5):
('amul', 'c@32', ('ishr', d, s))), s)),
]
# 8-bit rules are lowest precedence since we really like to fuse shifts
fuse_lea += [
(('iadd', a, ('u2u64', 'b@32')), ('ulea_agx', a, b, 0)),
(('iadd', a, ('i2i64', 'b@32')), ('ilea_agx', a, b, 0)),
]
# After lowering address arithmetic, the various address arithmetic opcodes are
# no longer useful. Lower them to regular arithmetic to let nir_opt_algebraic
# take over.