nir/algebraic: Simplify max(abs(a), 0.0) -> abs(a)
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 4 Jun 2019 19:54:12 +0000 (19:54 +0000)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 4 Jun 2019 19:57:19 +0000 (19:57 +0000)
commitd2d3cc66cf3dfc181780154f69e47c81a08325a1
tree61c6ce78529ba5b5f39867d7fad475b8ddd16aa3
parentc9c1e26106478258d8a91fe8fc5c69d8c3fa5206
nir/algebraic: Simplify max(abs(a), 0.0) -> abs(a)

This pattern was noticed in glmark's jellyfish scene.

v2: Add inexact qualifier due to NaN behaviour.

Minimal shader-db changes (slightly helped).

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Elie Tournier <tournier.elie@gmail.com>
src/compiler/nir/nir_opt_algebraic.py