nv50/ir: don't assert on type in Modifier.applyTo if it is 0
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Sun, 24 Feb 2013 17:36:44 +0000 (18:36 +0100)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Tue, 12 Mar 2013 11:55:35 +0000 (12:55 +0100)
src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp

index cc298d5..997d21a 100644 (file)
@@ -324,6 +324,8 @@ ConstantFolding::findOriginForTestWithZero(Value *value)
 void
 Modifier::applyTo(ImmediateValue& imm) const
 {
+   if (!bits) // avoid failure if imm.reg.type is unhandled (e.g. b128)
+      return;
    switch (imm.reg.type) {
    case TYPE_F32:
       if (bits & NV50_IR_MOD_ABS)