mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-11 23:10:28 +01:00
nv50/ir: allow immediate 0 to be loaded anywhere
There's a post-RA fixup to replace 0's with $r63 (or $r127 if too many regs are used), so just as nvc0, let an immediate 0 be loaded anywhere. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
parent
043d427538
commit
52a800a687
1 changed files with 6 additions and 0 deletions
|
|
@ -268,6 +268,12 @@ TargetNV50::insnCanLoad(const Instruction *i, int s,
|
|||
{
|
||||
DataFile sf = ld->src(0).getFile();
|
||||
|
||||
// immediate 0 can be represented by GPR $r63/$r127
|
||||
if (sf == FILE_IMMEDIATE && ld->getSrc(0)->reg.data.u64 == 0)
|
||||
return (!i->isPseudo() &&
|
||||
!i->asTex() &&
|
||||
i->op != OP_EXPORT && i->op != OP_STORE);
|
||||
|
||||
if (sf == FILE_IMMEDIATE && (i->predSrc >= 0 || i->flagsDef >= 0))
|
||||
return false;
|
||||
if (s >= opInfo[i->op].srcNr)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue