[Mesa-dev] [PATCH] r600/sb: fix rotated register in while loop (attempt 2)

Dave Airlie airlied at gmail.com
Fri Feb 16 04:44:21 UTC 2018


From: Dave Airlie <airlied at redhat.com>

A bunch of CTS tests led me to write
tests/shaders/ssa/fs-while-loop-rotate-value.shader_test
which r600/sb always fell over on.

GCM seems to move some of the copys into other basic blocks,
if we don't allow this to happen then it doesn't seem to schedule
them badly.

Everything I've read on SSA/phi copies say they have to happen
in parallel, so keeping them in the same basic block seems like
a good way to keep some of that property.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/gallium/drivers/r600/sb/sb_shader.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/r600/sb/sb_shader.cpp b/src/gallium/drivers/r600/sb/sb_shader.cpp
index 321e24ea25..8959b8391d 100644
--- a/src/gallium/drivers/r600/sb/sb_shader.cpp
+++ b/src/gallium/drivers/r600/sb/sb_shader.cpp
@@ -121,7 +121,7 @@ alu_node* shader::create_copy_mov(value* dst, value* src, unsigned affcost) {
 	alu_node *n = create_mov(dst, src);
 
 	dst->assign_source(src);
-	n->flags |= NF_COPY_MOV | NF_DONT_HOIST;
+	n->flags |= NF_COPY_MOV | NF_DONT_HOIST | NF_DONT_MOVE;
 
 	if (affcost && dst->is_sgpr() && src->is_sgpr())
 		coal.add_edge(src, dst, affcost);
-- 
2.14.3



More information about the mesa-dev mailing list