diff options
author | Matt Turner <mattst88@gmail.com> | 2015-10-02 20:18:34 -0700 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2015-10-05 13:42:58 -0700 |
commit | 596441992130460c7d9a792e50eea46d27297d44 (patch) | |
tree | 65939c248968b7d8b939f5b633d31409d4c0a3f5 /src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp | |
parent | 36ea9922ada5ea99e54231697a4afb31d5f6b9bf (diff) | |
download | external_mesa3d-596441992130460c7d9a792e50eea46d27297d44.zip external_mesa3d-596441992130460c7d9a792e50eea46d27297d44.tar.gz external_mesa3d-596441992130460c7d9a792e50eea46d27297d44.tar.bz2 |
i965/fs: Remove SNB embedded-comparison support from optimizations.
We never emit IF instructions with an embedded comparison (lost in the
switch to NIR), so this code is not used. If we want to readd support,
we should have a pass that merges a CMP instruction with an IF or a
WHILE instruction after other optimizations have run.
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp b/src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp index d190d8e..8613725 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp @@ -155,18 +155,6 @@ fs_visitor::opt_peephole_sel() if (movs == 0) continue; - enum brw_predicate predicate; - bool predicate_inverse; - if (devinfo->gen == 6 && if_inst->conditional_mod) { - /* For Sandybridge with IF with embedded comparison */ - predicate = BRW_PREDICATE_NORMAL; - predicate_inverse = false; - } else { - /* Separate CMP and IF instructions */ - predicate = if_inst->predicate; - predicate_inverse = if_inst->predicate_inverse; - } - /* Generate SEL instructions for pairs of MOVs to a common destination. */ for (int i = 0; i < movs; i++) { if (!then_mov[i] || !else_mov[i]) @@ -195,13 +183,6 @@ fs_visitor::opt_peephole_sel() if (movs == 0) continue; - /* Emit a CMP if our IF used the embedded comparison */ - if (devinfo->gen == 6 && if_inst->conditional_mod) { - const fs_builder ibld(this, block, if_inst); - ibld.CMP(ibld.null_reg_d(), if_inst->src[0], if_inst->src[1], - if_inst->conditional_mod); - } - for (int i = 0; i < movs; i++) { const fs_builder ibld = fs_builder(this, then_block, then_mov[i]) .at(block, if_inst); @@ -220,7 +201,7 @@ fs_visitor::opt_peephole_sel() ibld.MOV(src0, then_mov[i]->src[0]); } - set_predicate_inv(predicate, predicate_inverse, + set_predicate_inv(if_inst->predicate, if_inst->predicate_inverse, ibld.SEL(then_mov[i]->dst, src0, else_mov[i]->src[0])); } |