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 cc298d5bad6bce89d8ef26d011cb755ef52b5b33..997d21aaf27b836968296101938cfd37f963f082 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)