RFR: 8283726: x86_64 intrinsics for compareUnsigned method in Integer and Long
Vladimir Kozlov
kvn at openjdk.java.net
Tue Jun 7 18:14:19 UTC 2022
On Tue, 7 Jun 2022 17:14:18 GMT, Quan Anh Mai <duke at openjdk.java.net> wrote:
> Hi,
>
> This patch implements intrinsics for `Integer/Long::compareUnsigned` using the same approach as the JVM does for long and floating-point comparisons. This allows efficient and reliable usage of unsigned comparison in Java, which is a basic operation and is important for range checks such as discussed in #8620 .
>
> Thank you very much.
Please add microbenchmark and show its results.
src/hotspot/share/opto/subnode.hpp line 217:
> 215: //------------------------------CmpU3Node--------------------------------------
> 216: // Compare 2 unsigned values, returning integer value (-1, 0 or 1).
> 217: class CmpU3Node : public CmpUNode {
Place it after `CmpUNode` class.
-------------
PR: https://git.openjdk.java.net/jdk/pull/9068
More information about the core-libs-dev
mailing list