nv50: fix always true conditional in shader optimization
authorNicolas Kaiser <nikai@nikai.net>
Tue, 5 Oct 2010 09:26:43 +0000 (11:26 +0200)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Tue, 5 Oct 2010 16:53:15 +0000 (18:53 +0200)
src/gallium/drivers/nv50/nv50_pc_optimize.c

index 921ed15..27eb381 100644 (file)
@@ -452,7 +452,7 @@ nv_pass_lower_mods(struct nv_pass *ctx, struct nv_basic_block *b)
       if (nvi->opcode == NV_OP_SAT) {
          mi = nvi->src[0]->value->insn;
 
-         if (mi->opcode != NV_OP_ADD || mi->opcode != NV_OP_MAD)
+         if (mi->opcode != NV_OP_ADD && mi->opcode != NV_OP_MAD)
             continue;
          if (mi->flags_def || mi->def[0]->refc > 1)
             continue;