mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
pan/bi: Optimize pattern from nir_lower_idiv
This takes advantage of the .i1 modifier on the comparison to get b2i32 "for free" in typical circumstances, saving an instruction. Will help with an instr count regression from lower_idiv. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17266>
This commit is contained in:
parent
1ef20f1f35
commit
35a7490ce2
1 changed files with 2 additions and 0 deletions
|
|
@ -53,6 +53,8 @@ algebraic_late = [
|
|||
|
||||
(('fabs', ('fddx', a)), ('fabs', ('fddx_must_abs_mali', a))),
|
||||
(('fabs', ('fddy', b)), ('fabs', ('fddy_must_abs_mali', b))),
|
||||
|
||||
(('b32csel', 'b@32', ('iadd', 'a@32', 1), a), ('iadd', a, ('b2i32', b))),
|
||||
]
|
||||
|
||||
# Handling all combinations of boolean and float sizes for b2f is nontrivial.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue