RFR: 8347645: C2: XOR bounded value handling blocks constant folding [v42]
Emanuel Peter
epeter at openjdk.org
Mon Mar 24 15:44:16 UTC 2025
On Mon, 24 Mar 2025 15:39:31 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Johannes Graham has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 57 commits:
>>
>> - Merge branch 'openjdk:master' into xor_const
>> - Merge branch 'openjdk:master' into xor_const
>> - invert comparison in tests
>> - update bug numbers and summary
>> - add test of random ranges
>> - consistency
>> - Merge branch 'openjdk:master' into xor_const
>> - widen range of test values; add missing comment
>> - a few more tests
>> - add comments
>>
>> Co-authored-by: Emanuel Peter <emanuel.peter at oracle.com>
>> - ... and 47 more: https://git.openjdk.org/jdk/compare/02a4ce23...06537f21
>
> test/hotspot/jtreg/compiler/c2/irTests/XorINodeIdealizationTests.java line 385:
>
>> 383: public int testRandomLimits(int x, int y) {
>> 384: x = RANGE_1.clamp(x);
>> 385: y = RANGE_2.clamp(y);
>
> Question:
> did you verify that this `RANGE_1` with its clamp values are really detected as constants by C2, and not seen as loads? Maybe that works, but I've never tried it myself.
I just hope that the abstraction here does not invalidate our intent to have constant min/max bounds for the clamping ;)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23089#discussion_r2010435990
More information about the hotspot-compiler-dev
mailing list