summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2016-06-25 17:33:16 -0700
committerEric Anholt <[email protected]>2016-06-26 15:38:09 -0700
commitd20b89e9281d6d1ccf56a4eb743dc783fce2fc51 (patch)
tree164c07d349948dd6d1f042889e4f5116936d21d6 /src/compiler/nir
parentc7fa3c92f8fc9634af966e760a7601922cca43f6 (diff)
nir: Fix copy_prop_src when src is an indirect access on a reg.
The intent was to continue down the indirect chain, not to call ourselves with unchanged input arguments. Found by code inspection, and comparison to copy_prop_alu_src(). We haven't hit this because callers of NIR's copy prop are doing so in SSA, before indirect variable dereferences have been lowered to registers. Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r--src/compiler/nir/nir_opt_copy_propagate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_opt_copy_propagate.c b/src/compiler/nir/nir_opt_copy_propagate.c
index adca7fa6eff..c26e07fda71 100644
--- a/src/compiler/nir/nir_opt_copy_propagate.c
+++ b/src/compiler/nir/nir_opt_copy_propagate.c
@@ -103,7 +103,7 @@ copy_prop_src(nir_src *src, nir_instr *parent_instr, nir_if *parent_if)
{
if (!src->is_ssa) {
if (src->reg.indirect)
- return copy_prop_src(src, parent_instr, parent_if);
+ return copy_prop_src(src->reg.indirect, parent_instr, parent_if);
return false;
}