summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2013-02-24 18:36:44 +0100
committerChristoph Bumiller <[email protected]>2013-03-12 12:55:35 +0100
commita788be19e5bb65432b7701f6d663501f3484151c (patch)
treec48b32595be1da9212d865e05ac93a1ebb2c49bf
parentc3a5bc0bdf338453a5824f4bb50913600dc9f85a (diff)
nv50/ir: don't assert on type in Modifier.applyTo if it is 0
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp2
1 files changed, 2 insertions, 0 deletions
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)