diff options
Diffstat (limited to 'src/gallium/drivers/r600/sb')
-rw-r--r-- | src/gallium/drivers/r600/sb/sb_gvn.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/gallium/drivers/r600/sb/sb_gvn.cpp b/src/gallium/drivers/r600/sb/sb_gvn.cpp index 12cdb1c0240..caea4ec6660 100644 --- a/src/gallium/drivers/r600/sb/sb_gvn.cpp +++ b/src/gallium/drivers/r600/sb/sb_gvn.cpp @@ -194,16 +194,15 @@ void gvn::process_op(node& n, bool rewrite) { process_src(v->rel, rewrite); } - if (rewrite && v->gvn_source && v->gvn_source->is_readonly() - && n.is_any_alu()) { + if (rewrite && v->gvn_source && v->gvn_source->is_readonly() && + n.is_any_alu()) { process_alu_src_constants(n, v); - } else { - if (rewrite && (n.is_fetch_op(FETCH_OP_VFETCH) || - n.is_fetch_op(FETCH_OP_SEMFETCH))) - process_src(v, false); - else - process_src(v, rewrite); - } + } else if (rewrite && v->gvn_source && v->gvn_source->is_const() && + (n.is_fetch_op(FETCH_OP_VFETCH) || + n.is_fetch_op(FETCH_OP_SEMFETCH))) + process_src(v, false); + else + process_src(v, rewrite); } } if (n.pred) |