nv50/ir: avoid folding mul + add if the mul has a dnz
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:
@@ -1635,11 +1635,10 @@ AlgebraicOpt::tryADDToMADOrSAD(Instruction *add, operation toOp)
|
||||
if (src->getUniqueInsn() && src->getUniqueInsn()->bb != add->bb)
|
||||
return false;
|
||||
|
||||
if (src->getInsn()->saturate)
|
||||
if (src->getInsn()->saturate || src->getInsn()->postFactor ||
|
||||
src->getInsn()->dnz)
|
||||
return false;
|
||||
|
||||
if (src->getInsn()->postFactor)
|
||||
return false;
|
||||
if (toOp == OP_SAD) {
|
||||
ImmediateValue imm;
|
||||
if (!src->getInsn()->src(2).getImmediate(imm))
|
||||
|
||||
Reference in New Issue
Block a user