aarch64 AD-file / matching rule

Andrew Haley aph at redhat.com
Sat May 9 07:03:32 UTC 2015


On 04/23/2015 02:41 PM, Benedikt Wedenik wrote:
> One of the patterns I want to optimise is the following:
> 
> 0x0000007f8c2961b4: and	w2, w2, #0x7ffff8 0x0000007f8c2961b8: cmp	w2, #0x0 0x0000007f8c2961bc: b.eq	0x0000007f8c2968f4
> 
> 
> Here I see an opportunity for ands, b.eq.

It would make more sense to use cbz.  In fact, I have no idea why cbz
is not being used here.  I can't see any point to this pattern.


> [-client -Xcomp -XX:-TieredCompilation] : Here the cmp for #0x0 only occurs about 3 times in the whole disassembly, instead of about 200 times without these flags.

This tells you that the cmp for #0x0 is C1, not C2.

> My question is now how to find out why the rule does not match / if the rule is correct and how to find the actual rule which emits the code of my desired pattern.

1.  Use a debug build.

2.  Turn off tiered compilation.  Look at a disassembly and see which
    method and which line emits the code above.  You haven't provdied
    enough context.

3.  Forget about optimizing C1.  It will have no effect on benchmarks.

Andrew.


More information about the hotspot-compiler-dev mailing list