From: Christoph Bumiller Date: Sun, 24 Feb 2013 17:36:44 +0000 (+0100) Subject: nv50/ir: don't assert on type in Modifier.applyTo if it is 0 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a788be19e5bb65432b7701f6d663501f3484151c;p=mesa.git nv50/ir: don't assert on type in Modifier.applyTo if it is 0 --- diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp index cc298d5bad6..997d21aaf27 100644 --- a/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp +++ b/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp @@ -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)