i965: Emit MOVs for neg/abs.
authorMatt Turner <mattst88@gmail.com>
Thu, 8 Aug 2013 20:50:01 +0000 (13:50 -0700)
committerMatt Turner <mattst88@gmail.com>
Fri, 16 Aug 2013 20:11:07 +0000 (13:11 -0700)
commit0ae9ca12a887a5aca47edc2a6a99eac4235bf4b0
treeced4276dc96e8b1b21ea1e9dfbff6e5783c5dda8
parent079bdba05f870807d3ed77fa3093cdb7727aa2fd
i965: Emit MOVs for neg/abs.

Necessary to avoid combining a bitcast and a modifier into a single
operation. Otherwise if safe, the MOV should be removed by
copy-propagation or register coalescing.

With this and the next patch, there are only four changes in shader-db:
all a single extra instruction. The code does something like
   mov a.w, -b.x
and copy propagation doesn't work because it only handles no-op
swizzles. Seems acceptable, given the known limitation of our copy
propagation.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Paul Berry <stereoytpe441@gmail.com>
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp