nv50/ir: Fix type of the instruction created by mkCmp() for dst in FILE_FLAGS.
authorFrancisco Jerez <currojerez@riseup.net>
Mon, 9 Apr 2012 16:22:57 +0000 (18:22 +0200)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Sat, 14 Apr 2012 19:54:04 +0000 (21:54 +0200)
src/gallium/drivers/nv50/codegen/nv50_ir_build_util.cpp

index af1bdd5..f7dac25 100644 (file)
@@ -225,7 +225,8 @@ BuildUtil::mkCmp(operation op, CondCode cc, DataType ty, Value *dst,
 {
    CmpInstruction *insn = new_CmpInstruction(func, op);
 
-   insn->setType(dst->reg.file == FILE_PREDICATE ? TYPE_U8 : ty, ty);
+   insn->setType((dst->reg.file == FILE_PREDICATE ||
+                  dst->reg.file == FILE_FLAGS) ? TYPE_U8 : ty, ty);
    insn->setCondition(cc);
    insn->setDef(0, dst);
    insn->setSrc(0, src0);