nvc0: replace immd 0 with $rLASTGPR for emit/restart opcodes
authorBen Skeggs <bskeggs@redhat.com>
Fri, 9 May 2014 05:56:01 +0000 (15:56 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 14 May 2014 23:54:42 +0000 (09:54 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp

index dfaa28ff740489f75e162dbada053ae5190bbe96..fb9bed4454c430b0f15ececa6c3111d9b259caf1 100644 (file)
@@ -494,6 +494,7 @@ NVC0LegalizePostRA::visit(BasicBlock *bb)
             i->setDef(0, NULL);
          if (i->src(0).getFile() == FILE_IMMEDIATE)
             i->setSrc(0, rZero); // initial value must be 0
+         replaceZero(i);
       } else
       if (i->isNop()) {
          bb->remove(i);