nv50: fix thinko in store to output reg possible check
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Mon, 16 Aug 2010 15:18:30 +0000 (17:18 +0200)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Mon, 16 Aug 2010 22:47:47 +0000 (00:47 +0200)
src/gallium/drivers/nv50/nv50_pc_optimize.c

index 4cf387257df69efc6ae5b6299fc101259e0aa01b..5d575461ca92f744939fcaab2d1a1b8a324160cb 100644 (file)
@@ -315,7 +315,7 @@ nv_pass_fold_stores(struct nv_pass *ctx, struct nv_basic_block *b)
       for (j = 0; j < 4 && nvi->src[j]; ++j)
          if (nvi->src[j]->value->reg.file == NV_FILE_IMM)
             break;
-      if (j < 4)
+      if (j < 4 && nvi->src[j])
          continue;
 
       nvi->def[0] = sti->def[0];