From 143b2d1bb43ea6d45ddd29fed2c9b8c287d2b092 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 9 Feb 2013 19:12:54 -0500 Subject: [PATCH] r300g/compiler: Fix bug in OMOD folding The OMOD value was not being folded to instructions immediately preceding the MUL instruction. https://bugs.freedesktop.org/show_bug.cgi?id=60503 NOTE: This is a candidate for the stable branches. --- .../drivers/r300/compiler/radeon_optimize.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/gallium/drivers/r300/compiler/radeon_optimize.c b/src/gallium/drivers/r300/compiler/radeon_optimize.c index 7be9d9e..8d546d5 100644 --- a/src/gallium/drivers/r300/compiler/radeon_optimize.c +++ b/src/gallium/drivers/r300/compiler/radeon_optimize.c @@ -815,7 +815,7 @@ static int peephole_mul_omod( if (var->Inst->U.I.SaturateMode != RC_SATURATE_NONE) { return 0; } - for (inst = inst_mul->Prev; inst != var->Inst; + for (inst = inst_mul->Prev; inst != var->Inst->Prev; inst = inst->Prev) { rc_for_all_reads_mask(inst, omod_filter_reader_cb, &cb_data); -- 1.7.3.4