nv50/ir: fix cas lowering for 64 bit
Signed-off-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433>
This commit is contained in:
parent
d421af3a99
commit
d7b65cf7d3
|
@ -1734,9 +1734,10 @@ NVC0LoweringPass::handleCasExch(Instruction *cas, bool needCctl)
|
||||||
// happen elsewhere in the universe.
|
// happen elsewhere in the universe.
|
||||||
// Also, it sometimes returns the new value instead of the old one
|
// Also, it sometimes returns the new value instead of the old one
|
||||||
// under mysterious circumstances.
|
// under mysterious circumstances.
|
||||||
Value *dreg = bld.getSSA(8);
|
DataType ty = typeOfSize(typeSizeof(cas->dType) * 2);
|
||||||
|
Value *dreg = bld.getSSA(typeSizeof(ty));
|
||||||
bld.setPosition(cas, false);
|
bld.setPosition(cas, false);
|
||||||
bld.mkOp2(OP_MERGE, TYPE_U64, dreg, cas->getSrc(1), cas->getSrc(2));
|
bld.mkOp2(OP_MERGE, ty, dreg, cas->getSrc(1), cas->getSrc(2));
|
||||||
cas->setSrc(1, dreg);
|
cas->setSrc(1, dreg);
|
||||||
cas->setSrc(2, dreg);
|
cas->setSrc(2, dreg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue