RFR: 8347645: C2: XOR bounded value handling blocks constant folding [v7]
Emanuel Peter
epeter at openjdk.org
Mon Jan 27 09:48:49 UTC 2025
On Mon, 27 Jan 2025 09:44:31 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
>> Johannes Graham has updated the pull request incrementally with three additional commits since the last revision:
>>
>> - formatting
>> - simplified version of bounds check
>> - tests for xor hi=power of 2
>
> I would advise against adding more complicated jtreg tests as reasoning about them can be tricky. For these operations I think it would be more preferable to use a gtest which can directly inspect the details of `Type` objects while jtreg tests can only reason about them indirectly. You can generate some pairs of `Type`s, calculate their xor, then, try to sample some values inside the operands and assert that the results would be a member of the resulted `Type`.
@merykitty @j3graham
> I would advise against adding more complicated jtreg tests as reasoning about them can be tricky. For these operations I think it would be more preferable to use a gtest which can directly inspect the details of Type objects while jtreg tests can only reason about them indirectly. You can generate some pairs of Types, calculate their xor, then, try to sample some values inside the operands and assert that the results would be a member of the resulted Type.
Yes, actually `gtest` may be a better solution if that works!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23089#issuecomment-2615277909
More information about the hotspot-compiler-dev
mailing list