From a788be19e5bb65432b7701f6d663501f3484151c Mon Sep 17 00:00:00 2001 From: Christoph Bumiller Date: Sun, 24 Feb 2013 18:36:44 +0100 Subject: [PATCH] nv50/ir: don't assert on type in Modifier.applyTo if it is 0 --- src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.30.2