# HG changeset patch # User bharadwaj # Date 1397784561 14400 # Node ID aee7eeb554ada10d3c9918c07a3176d237f883c8 # Parent 735147ef017692e13250838d442bd498bc6295a3 [PTX] Fix PTX test regressions diff -r 735147ef0176 -r aee7eeb554ad graal/com.oracle.graal.compiler.ptx/src/com/oracle/graal/compiler/ptx/PTXLIRGenerator.java --- a/graal/com.oracle.graal.compiler.ptx/src/com/oracle/graal/compiler/ptx/PTXLIRGenerator.java Fri Apr 18 02:13:14 2014 +0200 +++ b/graal/com.oracle.graal.compiler.ptx/src/com/oracle/graal/compiler/ptx/PTXLIRGenerator.java Thu Apr 17 21:29:21 2014 -0400 @@ -830,13 +830,12 @@ @Override public void emitReturn(Value input) { - AllocatableValue operand = Value.ILLEGAL; if (input != null) { - operand = resultOperandFor(input.getKind()); + AllocatableValue operand = resultOperandFor(input.getKind()); // Load the global memory address from return parameter Variable loadVar = emitLoadReturnAddress(operand.getKind(), operand, null); - // Store result in global memory whose location is loadVar - emitStoreReturnValue(operand.getKind(), loadVar, operand, null); + // Store input in global memory whose location is loadVar + emitStoreReturnValue(operand.getKind(), loadVar, input, null); } emitReturnNoVal(); }