RFR: 8277850: C2: optimize mask checks in counted loops
Vladimir Kozlov
kvn at openjdk.java.net
Mon Dec 6 17:20:16 UTC 2021
On Mon, 6 Dec 2021 08:42:09 GMT, Roland Westrelin <roland at openjdk.org> wrote:
>> src/hotspot/share/opto/mulnode.cpp line 1719:
>>
>>> 1717: bool MulNode::AndIL_shift_and_mask(PhaseGVN* phase, Node* mask, Node* shift, BasicType bt) const {
>>> 1718: if (mask == NULL || shift == NULL) {
>>> 1719: return false;
>>
>> You need to check `shift` for `TOP`.
>
> Code below:
>
> const TypeInteger* shift_t = phase->type(shift)->isa_integer(bt);
> if (mask_t == NULL || shift_t == NULL) {
>
> catches the case where shift is top, I think.
You are right. It is type check.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6697
More information about the hotspot-compiler-dev
mailing list