mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 05:50:11 +01:00
nvc0/ir: fix TargetNVC0::insnCanLoadOffset()
Previously, TargetNVC0::insnCanLoadOffset() returned whether the offset
could be set to a specific value. The IndirectPropagation pass expected
it to return whether the offset could be increased by a specific value,
which is what TargetNV50::insnCanLoadOffset() does.
Fixes: 37b67db6ae
("nvc0/ir: be careful about propagating very large offsets into const load")
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
This commit is contained in:
parent
5b7d4f9428
commit
6bb0f87c60
1 changed files with 1 additions and 0 deletions
|
|
@ -415,6 +415,7 @@ bool
|
|||
TargetNVC0::insnCanLoadOffset(const Instruction *insn, int s, int offset) const
|
||||
{
|
||||
const ValueRef& ref = insn->src(s);
|
||||
offset += insn->src(s).get()->reg.data.offset;
|
||||
if (ref.getFile() == FILE_MEMORY_CONST &&
|
||||
(insn->op != OP_LOAD || insn->subOp != NV50_IR_SUBOP_LDC_IS))
|
||||
return offset >= -0x8000 && offset < 0x8000;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue