nv50/ir: optimize SHLADD(a, b, 0x0) to SHL(a, b)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
parent
e4eb0fca02
commit
2e008be9a9
|
@ -907,6 +907,14 @@ ConstantFolding::opnd3(Instruction *i, ImmediateValue &imm2)
|
|||
return;
|
||||
}
|
||||
break;
|
||||
case OP_SHLADD:
|
||||
if (imm2.isInteger(0)) {
|
||||
i->op = OP_SHL;
|
||||
i->setSrc(2, NULL);
|
||||
foldCount++;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue