nv50/ir: we can't replace 0x0 with zero reg for SHLADD
PATCH 1/1 nv50/ir: we can't replace 0x0 with zero reg for SHLADD
fixes a crash in Alien Isolation
--- src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp +1 -1
@@ -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); } }
Signature · 6 lines
2.12.2 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
Quoted 1 line · Karol Herbst
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.
Quoted 20 lines
Signed-off-by Karol Herbst <[email protected]>--- src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp +1
-2@@ -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); } } --
Quoted 2 lines
2.12.2
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
2017-04-29 17:18 GMT+02:00 Ilia Mirkin <[email protected]>:
Quoted 4 lines · Karol Herbst
Quoted 1 line
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
Quoted 1 line
How did the zero get there?
by replaceZero
Quoted 1 line
Does this only happen if you do your optimization loop thing?
no, it happens on master and the stable branches without any modifications
Quoted 5 lines
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.
Quoted 15 lines
Quoted 15 lines
Signed-off-by Karol Herbst <[email protected]>--- src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp +0
-0@@ -740,7 +740,7 @@ NVC0LegalizePostRA::visit(BasicBlock *bb) next = hi; }
Quoted 8 lines
Quoted 8 lines
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp +1
-2- 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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau