RFR: 8375653: C2: CmpUNode::sub is not monotonic
Quan Anh Mai
qamai at openjdk.org
Thu Jan 22 05:21:07 UTC 2026
On Thu, 22 Jan 2026 04:40:17 GMT, Dean Long <dlong at openjdk.org> wrote:
>> Would it make sense to have stand-alone C++ tests for these and maybe other interesting cases? Maybe using the gtest framework?
>
>> @dean-long I guess it is possible, but the implementation is simple enough that the test will just be a repetition of the implementation. Furthermore, doing so also requires some non-trivial refactoring since `CmpUNode::sub` inspects the structure around the node, not just the `Type` of its inputs. What do you think?
>
> Good point. I'm hoping we can get rid of node structure inspection, then we could make these static functions that only deal with the type. Even if it turns out that the is_index_range_check() code is still needed, we could make CmpULNode::sub static and refactor CmpUNode::sub to have a static helper that can be tested stand-alone.
@dean-long Thanks for your comments, I have addressed them.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29308#issuecomment-3782539304
More information about the hotspot-compiler-dev
mailing list