i965/fs: Allow CSE to handle MULs with negated arguments.
authorMatt Turner <mattst88@gmail.com>
Wed, 28 Jan 2015 03:18:46 +0000 (19:18 -0800)
committerMatt Turner <mattst88@gmail.com>
Tue, 31 Mar 2015 21:14:36 +0000 (14:14 -0700)
commit47c4b3854076adfe5a27b537f36262ac4ec4530d
tree2d248313643c5df81aaf756757b046fc1d46a73b
parent438c1c0080a00b073706a8708c5fd79dc42a7a15
i965/fs: Allow CSE to handle MULs with negated arguments.

mul x, -y is equivalent to mul -x, y; and mul x, y is the negation of
mul x, -y.

With NIR:
total instructions in shared programs: 6167779 -> 6161193 (-0.11%)
instructions in affected programs:     983511 -> 976925 (-0.67%)
helped:                                4106
HURT:                                  16
GAINED:                                18
LOST:                                  7

Without NIR:
total instructions in shared programs: 6192323 -> 6185299 (-0.11%)
instructions in affected programs:     987875 -> 980851 (-0.71%)
helped:                                4146
HURT:                                  16
GAINED:                                16
LOST:                                  0
src/mesa/drivers/dri/i965/brw_fs_cse.cpp