summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorKarol Herbst <[email protected]>2017-03-21 18:37:47 +0100
committerIlia Mirkin <[email protected]>2017-03-31 23:57:10 -0400
commitf2a4d881fe94512f7600ec33622af58b8ca06fff (patch)
treea6cecc45e8a67e9b9fee1922f692fc9bbd40add3 /src/gallium/drivers/nouveau
parentfac921db63c74c543aad090929187960fadeefa5 (diff)
nvc0/ir: also do ConstantFolding for FMA
Helps mainly Feral-ported games, due to their use of fma() shader-db changes: total instructions in shared programs : 3941587 -> 3940749 (-0.02%) total gprs used in shared programs : 481511 -> 481460 (-0.01%) total local used in shared programs : 27469 -> 27481 (0.04%) total bytes used in shared programs : 36123344 -> 36115776 (-0.02%) local gpr inst bytes helped 2 48 243 243 hurt 2 3 32 32 Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
index d358abc5bd7..2714b5ff7e0 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
@@ -1026,6 +1026,7 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s)
i->postFactor = 0;
}
break;
+ case OP_FMA:
case OP_MAD:
if (imm0.isInteger(0)) {
i->setSrc(0, i->getSrc(2));