RFR: 8153837 : aarch64: handle special cases for MaxINode & MinINode
Felix Yang
felix.yang at linaro.org
Fri Apr 8 14:36:02 UTC 2016
Hi,
Please review webrev: *http://cr.openjdk.java.net/~fyang/8153837/webrev.00/
<http://cr.openjdk.java.net/~fyang/8153837/webrev.00/>*
JIRA Issue:
*https://bugs.openjdk.java.net/browse/JDK-8153837
<https://bugs.openjdk.java.net/browse/JDK-8153837>*
Patch handles code generation for special cases where one arg is -1/0/1
of MaxINode & MinINode eliminating one extra mov instruction.
As shown in the JIRA Issue, I saw some occurrences of the specail cases
in specJBB2005 and other benchmarks.
The patch does something like this:
min(x, 1)
=>
cmp x, 0
csinc x, x, zr, le
min(x, -1)
=>
cmp x, 0
csinv x, x, zr, lt
max(x, 1)
=>
cmp x, 0
csinc x, x, zr, gt
max(x, -1)
=>
cmp x, 0
csinv x, x, zr, ge
Tested with JTreg hotspot, langtools. Is it OK?
Thanks,
Felix
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160408/39f54d6f/attachment-0001.html>
More information about the hotspot-compiler-dev
mailing list