From: Ilia Mirkin Date: Thu, 2 Apr 2015 22:42:31 +0000 (-0400) Subject: nv50/ir: avoid folding immediates into imad operations X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=01d3b750b3682f3774f1bd01fa07a6b3c8baf28e;p=mesa.git nv50/ir: avoid folding immediates into imad operations Commit 09ee907266 added logic to fold immediates into mad operations, but the emission code is only there for fmad. Only allow it on float types. Signed-off-by: Ilia Mirkin --- diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp index dc048e605a5..87d95892326 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp @@ -2315,7 +2315,8 @@ NV50PostRaConstantFolding::visit(BasicBlock *bb) i->src(0).getFile() != FILE_GPR || i->src(1).getFile() != FILE_GPR || i->src(2).getFile() != FILE_GPR || - i->getDef(0)->reg.data.id != i->getSrc(2)->reg.data.id) + i->getDef(0)->reg.data.id != i->getSrc(2)->reg.data.id || + !isFloatType(i->dType)) break; def = i->getSrc(1)->getInsn();