nv50: fix bad assertion on Elements(phi->src) in regalloc
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Mon, 6 Feb 2012 11:15:17 +0000 (12:15 +0100)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Mon, 6 Feb 2012 11:19:57 +0000 (12:19 +0100)
The array is phi->src, phi->src[i] is just a pointer.

src/gallium/drivers/nv50/nv50_pc_regalloc.c

index 72922cb0388bf65e71889a5b383dde4058b036f8..12a59cb6cbd7f27a769bd3315f32f4022526ced5 100644 (file)
@@ -421,7 +421,7 @@ phi_opnd_for_bb(struct nv_instruction *phi, struct nv_basic_block *b,
    int i, j;
 
    for (j = -1, i = 0; i < 6 && phi->src[i]; ++i) {
-      assert(i < Elements(phi->src[i]));
+      assert(i < Elements(phi->src));
       srci = phi->src[i];
       /* if already replaced, check with original source first */
       if (srci->flags & NV_REF_FLAG_REGALLOC_PRIV)