RFR: 8286197: C2: Optimize MemorySegment shape in int loop
Roland Westrelin
roland at openjdk.java.net
Thu May 5 16:08:13 UTC 2022
On Thu, 5 May 2022 15:57:55 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
> Good suggestion. I have comments.
Thanks for reviewing this.
> src/hotspot/share/opto/castnode.cpp line 385:
>
>> 383: const Type* t = Value(phase);
>> 384: const Type* t_in = phase->type(in1);
>> 385: if (t != Type::TOP && t_in != Type::TOP && t != t_in) {
>
> `t != t_in` does not mean that type is narrower in general case. I think we need to check ranges (types meet?).
Thanks for looking at this. t is the result of Value() which takes the type of its input into account so, AFAICT, there's no way t can be wider than t_in. Am I missing something? If not I could add an assert. What do you think?
-------------
PR: https://git.openjdk.java.net/jdk/pull/8555
More information about the hotspot-compiler-dev
mailing list