RFR: 8347645: C2: XOR bounded value handling blocks constant folding [v33]
Johannes Graham
duke at openjdk.org
Wed Feb 26 19:40:56 UTC 2025
On Wed, 26 Feb 2025 06:51:44 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Also, as you commented on somewhere above, having a way to target Types from a stand-alone gtest, would also be a really nice way of making things more testable.
>
>> For example the "pow2" tests are there because that was a scenario that caused some trouble. I think there is a relatively small set of "interesting" cases that are nice to cover with something deterministic. (I could add a few more tests with hard-coded interesting values).
>
> I know that there are only few "interesting" cases. That's why I came up with `Generators` so we would be more likely to hit the interesting cases.
>
> Of course we want to have a good number of deterministic cases. But extending that with some randomized tests that would find bugs over a longer time span are still valuable.
>
> The issue is often that there are edge cases, and humans are not very good at finding them. Thus with randomization we would at least eventually find those cases - hopefully. And in my experience I did find bugs with randomized tests. Sometimes we found bugs that were not related to the issue they were created for originally, but they found some other issue - and that is valuable too.
>
>> It feels disproportionate to do something more complicated for this PR.
>
> It's really not that complicated. All I'd be asking for is the test in the form that I provided above ;)
I've added the test.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23089#discussion_r1972268860
More information about the hotspot-compiler-dev
mailing list