nv50/ir: when constant folding shl(mul, a) we need to copy muls type
Also clear subop while at it as we might convert a shl.wrap to mul. Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11021>
This commit is contained in:
parent
5e88a1caca
commit
e7485f1294
|
@ -1502,6 +1502,9 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s)
|
||||||
|
|
||||||
bld.setPosition(i, false);
|
bld.setPosition(i, false);
|
||||||
i->op = OP_MUL;
|
i->op = OP_MUL;
|
||||||
|
i->subOp = 0;
|
||||||
|
i->dType = si->dType;
|
||||||
|
i->sType = si->sType;
|
||||||
i->setSrc(0, si->getSrc(!muls));
|
i->setSrc(0, si->getSrc(!muls));
|
||||||
i->setSrc(1, bld.loadImm(NULL, imm1.reg.data.u32 << imm0.reg.data.u32));
|
i->setSrc(1, bld.loadImm(NULL, imm1.reg.data.u32 << imm0.reg.data.u32));
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue