nvc0/ir: SHLADD's middle source must be an immediate
The instruction encodings only allow for immediates. Don't try to replace a zero (which is dumb to have in that op in any case) with RZ. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: mesa-stable@lists.freedesktop.org
This commit is contained in:
parent
f0051fcf2b
commit
82e77d4e44
|
@ -642,6 +642,8 @@ NVC0LegalizePostRA::replaceZero(Instruction *i)
|
|||
for (int s = 0; i->srcExists(s); ++s) {
|
||||
if (s == 2 && i->op == OP_SUCLAMP)
|
||||
continue;
|
||||
if (s == 1 && i->op == OP_SHLADD)
|
||||
continue;
|
||||
ImmediateValue *imm = i->getSrc(s)->asImm();
|
||||
if (imm) {
|
||||
if (i->op == OP_SELP && s == 2) {
|
||||
|
|
Loading…
Reference in New Issue