* [PATCH] nv50/ir: we can't replace 0x0 with zero reg for SHLADD
@ 2017-04-29 14:41 Karol Herbst
[not found] ` <20170429144146.3905-1-karolherbst-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Karol Herbst @ 2017-04-29 14:41 UTC (permalink / raw)
To: mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
fixes a crash in Alien Isolation
Signed-off-by: Karol Herbst <karolherbst@gmail.com>
---
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
index 732e1a93b4..4815d6df07 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
@@ -740,7 +740,7 @@ NVC0LegalizePostRA::visit(BasicBlock *bb)
next = hi;
}
- if (i->op != OP_MOV && i->op != OP_PFETCH)
+ if (i->op != OP_MOV && i->op != OP_PFETCH && i->op != OP_SHLADD)
replaceZero(i);
}
}
--
2.12.2
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <20170429144146.3905-1-karolherbst-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] nv50/ir: we can't replace 0x0 with zero reg for SHLADD [not found] ` <20170429144146.3905-1-karolherbst-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2017-04-29 15:18 ` Ilia Mirkin [not found] ` <CAKb7UvgBwo6nfq8Gxz56C0SqdcA9NTX729ekJexNPuu60d=ZyQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Ilia Mirkin @ 2017-04-29 15:18 UTC (permalink / raw) To: Karol Herbst Cc: mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org On Sat, Apr 29, 2017 at 10:41 AM, Karol Herbst <karolherbst@gmail.com> wrote: > fixes a crash in Alien Isolation What crash? How did the zero get there? Does this only happen if you do your optimization loop thing? In either case, we still want the replaceZero() logic. However that logic should be aware that the middle argument of a SHLADD is not to be touched. Otherwise we could end up with an un-emittable instruction. > > Signed-off-by: Karol Herbst <karolherbst@gmail.com> > --- > src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp > index 732e1a93b4..4815d6df07 100644 > --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp > +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp > @@ -740,7 +740,7 @@ NVC0LegalizePostRA::visit(BasicBlock *bb) > next = hi; > } > > - if (i->op != OP_MOV && i->op != OP_PFETCH) > + if (i->op != OP_MOV && i->op != OP_PFETCH && i->op != OP_SHLADD) > replaceZero(i); > } > } > -- > 2.12.2 > _______________________________________________ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <CAKb7UvgBwo6nfq8Gxz56C0SqdcA9NTX729ekJexNPuu60d=ZyQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] nv50/ir: we can't replace 0x0 with zero reg for SHLADD [not found] ` <CAKb7UvgBwo6nfq8Gxz56C0SqdcA9NTX729ekJexNPuu60d=ZyQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2017-04-29 15:53 ` Karol Herbst 0 siblings, 0 replies; 3+ messages in thread From: Karol Herbst @ 2017-04-29 15:53 UTC (permalink / raw) To: Ilia Mirkin Cc: mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org 2017-04-29 17:18 GMT+02:00 Ilia Mirkin <imirkin@alum.mit.edu>: > On Sat, Apr 29, 2017 at 10:41 AM, Karol Herbst <karolherbst@gmail.com> wrote: >> fixes a crash in Alien Isolation > > What crash? assertion, because shladd requires an immediate, there can't be a reg at src1 "shladd u32 $r0 $r0 $r63 $r36" is invalid for the emiter so we have to use 0x0 here > How did the zero get there? by replaceZero > Does this only happen if you do your optimization loop thing? no, it happens on master and the stable branches without any modifications > > In either case, we still want the replaceZero() logic. However that > logic should be aware that the middle argument of a SHLADD is not to > be touched. Otherwise we could end up with an un-emittable > instruction. ohh right, you mean for the other args... true. > >> >> Signed-off-by: Karol Herbst <karolherbst@gmail.com> >> --- >> src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp >> index 732e1a93b4..4815d6df07 100644 >> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp >> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp >> @@ -740,7 +740,7 @@ NVC0LegalizePostRA::visit(BasicBlock *bb) >> next = hi; >> } >> >> - if (i->op != OP_MOV && i->op != OP_PFETCH) >> + if (i->op != OP_MOV && i->op != OP_PFETCH && i->op != OP_SHLADD) >> replaceZero(i); >> } >> } >> -- >> 2.12.2 >> _______________________________________________ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-29 15:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-29 14:41 [PATCH] nv50/ir: we can't replace 0x0 with zero reg for SHLADD Karol Herbst
[not found] ` <20170429144146.3905-1-karolherbst-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-29 15:18 ` Ilia Mirkin
[not found] ` <CAKb7UvgBwo6nfq8Gxz56C0SqdcA9NTX729ekJexNPuu60d=ZyQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-29 15:53 ` Karol Herbst
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.