RFR: 8256655: rework long counted loop handling [v2]
Roland Westrelin
roland at openjdk.java.net
Fri Nov 20 08:59:22 UTC 2020
On Thu, 19 Nov 2020 19:26:41 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> Roland Westrelin has updated the pull request incrementally with one additional commit since the last revision:
>>
>> build fixes
>
> src/hotspot/share/opto/cfgnode.cpp line 1097:
>
>> 1095: const TypeInteger* lo = phase->type(init)->isa_integer(l->bt());
>> 1096: const TypeInteger* hi = phase->type(limit)->isa_integer(l->bt());
>> 1097: const TypeInteger* stride_t = phase->type(stride)->isa_integer(l->bt());
>
> Do we have assert somewhere which checks that all loop's values (init, limit, stride) have the same type?
Thanks for reviewing it.
> Do we have assert somewhere which checks that all loop's values (init, limit, stride) have the same type?
isa_integer() is passed l->bt() which is T_INT for a CountedLoop and T_LONG for LongCountedLoop. This causes isa_integer() to either call isa_int() or isa_long(). So yes, they should all be the same type and the type that matches the loop's type.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1316
More information about the hotspot-compiler-dev
mailing list