[12] RFR(M): 8210215: C2 should optimize trichotomy calculations

John Rose john.r.rose at oracle.com
Tue Sep 25 23:57:26 UTC 2018


On Sep 25, 2018, at 2:28 AM, Tobias Hartmann <tobias.hartmann at oracle.com> wrote:
> 
> Thanks to John for pre-reviewing this change.

Based on a partial inspection, two comments:

`res[9][9]` should be `res[illegal+1][illegal+1]` and should have rows and columns for `never`
(code smell:  `9` is a naked constant; makes it hard to tell your table is out of date)

In the test cases `compare1` has `(a < b) ? -1 : (a == b) ? 0 : 1`.
Shouldn’t you also test `(a < b) ? -1 : (a <= b) ? 0 : 1`?
And similarly, for other cases where the second test overlaps
with the first.

— John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20180925/02a3905c/attachment-0001.html>


More information about the hotspot-compiler-dev mailing list