Sub-word comparisons

Doug Simon doug.simon at oracle.com
Thu Nov 3 19:51:50 UTC 2016


> On 3 Nov 2016, at 20:24, Andrew Haley <aph at redhat.com> wrote:
> 
> On 03/11/16 19:18, Doug Simon wrote:
> 
>> The lowering of a CompareNode to a CompareOp is AArch64 specific as
>> far as I can see. This originates from the AArch64 implementations
>> of LIRGenerator.emitCompareBranch and
>> LIRGenerator.emitConditionalMove. You’ll have to change those
>> methods to generate LIR ops that AArch64 actually supports.
> 
> Oh sure, I can do that, but that wasn't my problem, it was how to stop
> Graal from creating sub-word comparisons in the first place.  Such
> operations aren't part of the JVM at all, but are generated when the
> bytecode is canonicalized.  I can generate code for sub-word
> comparisons, but it won't be good code.  AArch64 is designed to work
> well for languages like C and Java, which don't have any arithmetic
> operations on sub-word types.

I’m not sure where (or if) Graal generates sub-word comparisons nowadays so am not sure where we’d have to add a capability check. Have you seen it occur? I’ve just run all our unit tests as well as a bootstrap and never saw it occur.

-Doug


More information about the graal-dev mailing list