aarch64 AD-file / matching rule

Andrew Haley aph at redhat.com
Thu Apr 30 10:27:23 UTC 2015

On 30/04/15 11:06, Benedikt Wedenik wrote:
> But I found out, that the pattern I was searching for is emitted here:
> cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp

That's the C1 (i.e. the client JIT) compiler, which does very little
optimization.  These days the only real purpose of C1 is to generate
profile data for C2.  Of course it is nice if C1 generates code which
is basically decent.

> This means, my pattern will never match the rule in the AD-file
> because it is more or less “hardcoded” :)

Right.  C1 does not use the .ad file, and indeed its patterns are

> I wrote a small simulation program to see if the rule would match in
> JIT-compiled code and it worked.
> I’ll do some more investigation in how to optimise this pattern in
> the C++ code because it occurs quite often.

I would expect C2 to do this:

  and     w3, w12, #0x7ffff
  cbnz    w3, ...


More information about the hotspot-compiler-dev mailing list