From: Vadim Girlin Date: Fri, 3 May 2013 09:01:31 +0000 (+0400) Subject: r600g/sb: fix constant propagation in gvn pass X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f92bd0958e5f6453aa5cf8d54cd57546ca5de963;p=mesa.git r600g/sb: fix constant propagation in gvn pass Fixes the bug that prevented propagation of literals in some cases. Signed-off-by: Vadim Girlin --- diff --git a/src/gallium/drivers/r600/sb/sb_gvn.cpp b/src/gallium/drivers/r600/sb/sb_gvn.cpp index 6798917b189..fe4f884e21f 100644 --- a/src/gallium/drivers/r600/sb/sb_gvn.cpp +++ b/src/gallium/drivers/r600/sb/sb_gvn.cpp @@ -159,7 +159,8 @@ void gvn::process_alu_src_constants(node &n, value* &v) { rp_kcache_tracker kc(sh); - kc.try_reserve(v->gvn_source->select); + if (v->gvn_source->is_kcache()) + kc.try_reserve(v->gvn_source->select); // don't propagate 3rd constant to the trans-only instruction if (!n.is_alu_packed()) {