diff options
author | Matt Turner <[email protected]> | 2014-10-26 22:07:06 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-02-17 20:44:09 -0800 |
commit | 36bc5f06dd22cde0ba572c00ae7548fe8cb7c731 (patch) | |
tree | b9662cceb428e6b392d0de41f3ae4de278e54df0 /src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | |
parent | 2dad1e3abdb1ad153289455f3e273101e5bac1a8 (diff) |
i965/fs: Allow immediates in MAD and LRP instructions.
And then the opt_combine_constants() pass will pull them out into
registers. This will allow us to do some algebraic optimizations on MAD
and LRP.
total instructions in shared programs: 5946656 -> 5931320 (-0.26%)
instructions in affected programs: 778247 -> 762911 (-1.97%)
helped: 3780
HURT: 6
GAINED: 12
LOST: 12
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp index 3bc4435ac92..e265ce0fd8c 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp @@ -576,6 +576,12 @@ fs_visitor::try_constant_propagate(fs_inst *inst, acp_entry *entry) progress = true; break; + case BRW_OPCODE_MAD: + case BRW_OPCODE_LRP: + inst->src[i] = val; + progress = true; + break; + default: break; } |