aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2015-06-26 14:32:08 -0400
committerRob Clark <[email protected]>2015-06-30 12:13:44 -0400
commit1370fde8af1b0b5c5e6204c0dea6ebffb85dce0a (patch)
tree830af23a8963deb9d483b0ce8bbb0c0dfc04275c /src/gallium/drivers/freedreno
parentbb2c4b68f78f0105088c11408f8902fb22802125 (diff)
freedreno/ir3: fix crash in RA
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_ra.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_ra.c b/src/gallium/drivers/freedreno/ir3/ir3_ra.c
index 0436e01ab2c..ee610c7d01e 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_ra.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_ra.c
@@ -403,6 +403,7 @@ get_definer(struct ir3_instruction *instr, int *sz, int *off)
* the phi, so we don't need to chase definers
*/
struct ir3_register *src;
+ struct ir3_instruction *dd = d;
/* note: don't use foreach_ssa_src as this gets called once
* while assigning regs (which clears SSA flag)
@@ -410,9 +411,11 @@ get_definer(struct ir3_instruction *instr, int *sz, int *off)
foreach_src(src, d) {
if (!src->instr)
continue;
- if (src->instr->ip < d->ip)
- d = src->instr;
+ if (src->instr->ip < dd->ip)
+ dd = src->instr;
}
+
+ d = dd;
}
if (is_meta(d) && (d->opc == OPC_META_FO)) {