nir/algebraic: Simplify min and max of b2i
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 15 Feb 2022 23:32:00 +0000 (15:32 -0800)
committerMarge Bot <emma+marge@anholt.net>
Wed, 14 Dec 2022 06:23:20 +0000 (06:23 +0000)
commitee15d893224c1eee5c239e54f7aa5191bec55377
treef0fa757d998b102210cd36aef05eaa8b2432688b
parent19222867e43679885533c08004c0c003c44748c3
nir/algebraic: Simplify min and max of b2i

This prevents ~400 shader-db regresssions and a handful of fossil-db
regressions after i2b is always lowered.

All Ivy Bridge and newer Intel platforms had similar results. (Ice Lake shown)
total cycles in shared programs: 855301494 -> 855302118 (<.01%)
cycles in affected programs: 52787 -> 53411 (1.18%)
helped: 4 / HURT: 5

All Intel platforms had similar results. (Ice Lake shown)
Instructions in all programs: 141206055 -> 141205979 (-0.0%)
Instructions helped: 14

Cycles in all programs: 9133376616 -> 9133387327 (+0.0%)
Cycles helped: 13
Cycles hurt: 3

Acked-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15121>
src/compiler/nir/nir_opt_algebraic.py