i965/fs: Change SEL and MOV types as needed to propagate source modifiers
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 3 Apr 2015 18:07:47 +0000 (11:07 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 17 Apr 2015 18:01:34 +0000 (11:01 -0700)
commit472ef9a02f2e5c5d0caa2809cb736a0f4f0d4693
treea9d191f4319479b8b47c489d8af5594415195bea
parentbb99a58e7710acd19463646c38cdddbd926e89c4
i965/fs: Change SEL and MOV types as needed to propagate source modifiers

SEL and MOV instructions, as long as they don't have source modifiers, are
just copying bits around.  This commit adds support to copy propagation to
switch the type of a SEL or MOV instruction as needed so that it can
propagate source modifiers.  This is needed because NIR generates integer
SEL and MOV instructions whenver it doesn't know what else to generate.

shader-db results with NIR:
total FS instructions in shared programs: 4360910 -> 4360186 (-0.02%)
FS instructions in affected programs:     59094 -> 58370 (-1.23%)
helped:                                   341
HURT:                                     0
GAINED:                                   2
LOST:                                     0

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp