# HG changeset patch # User Roland Schatz # Date 1447257733 -3600 # Node ID 2adc45c38bde4b35a950c01dc82690c6727931ea # Parent 009789e41bcfdda03a76cb4a0b33d05138969e1b Use correct operand size when emitting TEST instruction for null comparison. diff -r 009789e41bcf -r 2adc45c38bde graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64ArithmeticLIRGenerator.java --- a/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64ArithmeticLIRGenerator.java Wed Nov 11 13:38:43 2015 +0100 +++ b/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64ArithmeticLIRGenerator.java Wed Nov 11 17:02:13 2015 +0100 @@ -1072,7 +1072,7 @@ if (isConstantValue(right)) { Constant c = LIRValueUtil.asConstant(right); if (JavaConstant.isNull(c)) { - getLIRGen().append(new AMD64BinaryConsumer.Op(TEST, DWORD, left, left)); + getLIRGen().append(new AMD64BinaryConsumer.Op(TEST, size, left, left)); return; } else if (c instanceof VMConstant) { VMConstant vc = (VMConstant) c;