diff options
author | Matt Turner <[email protected]> | 2014-02-11 13:04:55 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-07-24 11:27:44 -0700 |
commit | 96128d134be82cd5a8cda2c473c1242c18409029 (patch) | |
tree | 5afa96ec21c7aaeb565baa028398780427f73706 /src/mesa/drivers/dri | |
parent | ac2acf04f750a84fc6381b6efacfe1bbac61aa4d (diff) |
i965/fs: Swap if/else conditions in SEL peephole.
Will clarify make the next commit easier to read.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp | 6 |
1 files changed, 3 insertions, 3 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 cf47cb5fd81..c0bba8e7ced 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp @@ -175,7 +175,9 @@ fs_visitor::opt_peephole_sel() break; } - if (!then_mov[i]->src[0].equals(else_mov[i]->src[0])) { + if (then_mov[i]->src[0].equals(else_mov[i]->src[0])) { + sel_inst[i] = MOV(then_mov[i]->dst, then_mov[i]->src[0]); + } else { /* Only the last source register can be a constant, so if the MOV * in the "then" clause uses a constant, we need to put it in a * temporary. @@ -197,8 +199,6 @@ fs_visitor::opt_peephole_sel() sel_inst[i]->predicate = if_inst->predicate; sel_inst[i]->predicate_inverse = if_inst->predicate_inverse; } - } else { - sel_inst[i] = MOV(then_mov[i]->dst, then_mov[i]->src[0]); } } |