RFR: 8364766: C2: Improve Value() of DivI and DivL for non-constant inputs [v6]
Jasmine Karthikeyan
jkarthikeyan at openjdk.org
Mon Aug 25 14:32:52 UTC 2025
On Mon, 25 Aug 2025 12:32:30 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> It depends on the template type. I would rather keep it to sanity check that the minimum value of `NativeType` is as we expect. If that does not hold, the optimization below is potentially wrong and has UB.
>
> We will one day want to use use smaller integer types here, just for some exhaustive gtesting. But I suppose we can remove it at that point.
Could this be made a `static_assert` instead? That way we can test the condition, but we wouldn't need to pay a runtime cost. The C++ compiler might already do such an optimization, but it'd be good to be more explicit.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26143#discussion_r2298279235
More information about the hotspot-compiler-dev
mailing list