From f92bd0958e5f6453aa5cf8d54cd57546ca5de963 Mon Sep 17 00:00:00 2001 From: Vadim Girlin Date: Fri, 3 May 2013 13:01:31 +0400 Subject: [PATCH] r600g/sb: fix constant propagation in gvn pass Fixes the bug that prevented propagation of literals in some cases. Signed-off-by: Vadim Girlin --- src/gallium/drivers/r600/sb/sb_gvn.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()) { -- 2.30.2