r600/sb: Do not distribute neg in expr_handler::fold_assoc() when folding multiplicat...
authorxavier <xavierb@gmail.com>
Wed, 9 Mar 2016 08:58:48 +0000 (09:58 +0100)
committerDave Airlie <airlied@redhat.com>
Mon, 21 Mar 2016 21:43:13 +0000 (07:43 +1000)
commitfce0b55ccbc33d320b9734a53c2a9f7886450c73
tree65d694e8952936a25a7db6fe106579cbe05910cc
parent9efd8b590f716bb7766ae6816bc080e7ef60a010
r600/sb: Do not distribute neg in expr_handler::fold_assoc() when folding multiplications.

Previously it was doing this transformation for a Trine 3 shader:
     MUL     R6.x.12,    R13.x.23, 0.5|3f000000
-    MULADD     R4.x.12,    -R6.x.12, 2|40000000, 1|3f800000
+    MULADD     R4.x.12,    -R13.x.23, -1|bf800000, 1|3f800000

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94412
Signed-off-by: Xavier Bouchoux <xavierb@gmail.com>
Cc: "11.0 11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/sb/sb_expr.cpp