nir/algebraic: Tautology replacements require sources be numbers

It seems worth the small amount of damage to give an extra cushion of
not having to debug problems later.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>

All Intel platforms had similar results. (Tiger Lake shown)
total instructions in shared programs: 21043197 -> 21043359 (<.01%)
instructions in affected programs: 4409 -> 4571 (3.67%)
helped: 0
HURT: 25
HURT stats (abs)   min: 1 max: 16 x̄: 6.48 x̃: 5
HURT stats (rel)   min: 0.39% max: 15.38% x̄: 4.59% x̃: 4.40%
95% mean confidence interval for instructions value: 4.37 8.59
95% mean confidence interval for instructions %-change: 2.93% 6.26%
Instructions are HURT.

total cycles in shared programs: 856175986 -> 856176921 (<.01%)
cycles in affected programs: 58908 -> 59843 (1.59%)
helped: 0
HURT: 25
HURT stats (abs)   min: 7 max: 70 x̄: 37.40 x̃: 38
HURT stats (rel)   min: 0.27% max: 5.63% x̄: 1.87% x̃: 1.39%
95% mean confidence interval for cycles value: 31.11 43.69
95% mean confidence interval for cycles %-change: 1.35% 2.39%
Cycles are HURT.

No fossil-db changes on any Intel platform.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10012>
This commit is contained in:
Ian Romanick
2021-02-26 07:12:42 -08:00
committed by Marge Bot
parent d69ba58644
commit 49177b9e2f
2 changed files with 46 additions and 6 deletions

View File

@@ -1177,13 +1177,13 @@ optimizations.extend([
# The results expecting true, must be marked imprecise. The results
# expecting false are fine because NaN compared >= or < anything is false.
(('~fge', 'a(is_not_negative)', 'b(is_not_positive)'), True),
(('fge', 'a(is_not_positive)', 'b(is_gt_zero)'), False),
(('fge', 'a(is_lt_zero)', 'b(is_not_negative)'), False),
(('fge', 'a(is_a_number_not_negative)', 'b(is_a_number_not_positive)'), True),
(('fge', 'a(is_not_positive)', 'b(is_gt_zero)'), False),
(('fge', 'a(is_lt_zero)', 'b(is_not_negative)'), False),
(('flt', 'a(is_not_negative)', 'b(is_not_positive)'), False),
(('~flt', 'a(is_not_positive)', 'b(is_gt_zero)'), True),
(('~flt', 'a(is_lt_zero)', 'b(is_not_negative)'), True),
(('flt', 'a(is_not_negative)', 'b(is_not_positive)'), False),
(('flt', 'a(is_a_number_not_positive)', 'b(is_a_number_gt_zero)'), True),
(('flt', 'a(is_a_number_lt_zero)', 'b(is_a_number_not_negative)'), True),
(('ine', 'a(is_not_zero)', 0), True),
(('ieq', 'a(is_not_zero)', 0), False),