Revert "nir/algebraic: distribute fmul(fadd(a, b), c) when b and c are constants"

This reverts commit a1af902531.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5423
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14532>
This commit is contained in:
Bas Nieuwenhuizen
2022-01-13 12:51:52 +01:00
committed by Marge Bot
parent 1b88777e97
commit d1530a3f3b
6 changed files with 28 additions and 30 deletions
-2
View File
@@ -488,8 +488,6 @@ optimizations.extend([
# (a + #b) * #c => (a * #c) + (#b * #c)
(('imul', ('iadd(is_used_once)', a, '#b'), '#c'), ('iadd', ('imul', a, c), ('imul', b, c))),
(('~fmul', ('fadd(is_used_once)', a, '#b'), '#c'), ('fadd', ('fmul', a, c), ('fmul', b, c)),
'!options->avoid_ternary_with_two_constants'),
# ((a + #b) + c) * #d => ((a + c) * #d) + (#b * #d)
(('imul', ('iadd(is_used_once)', ('iadd(is_used_once)', a, '#b'), c), '#d'),