RFR: 8278949: Cleanups for 8277850
Roland Westrelin
roland at openjdk.java.net
Mon Dec 20 09:57:26 UTC 2021
On Sun, 19 Dec 2021 20:03:27 GMT, John R Rose <jrose at openjdk.org> wrote:
>> When 8277850 (C2: optimize mask checks in counted loops) was reviewed,
>> John made a number of comments and suggestions after the change was
>> integrated. This change includes all of his comments, extra tests to
>> cover all cases. I also moved the AndIL_add_shift_and_mask() call in
>> AndXNode::Ideal() up so the expression with a non constant mask can be
>> optimized as well.
>
> Looks good. One naming suggestion about `AndIL_shift_and_mask`
@rose00 @vnkozlov thanks for the reviews.
> src/hotspot/share/opto/mulnode.cpp line 1730:
>
>> 1728: // Because the optimization might work for a non-constant
>> 1729: // mask M, we check the AndX for both operand orders.
>> 1730: bool MulNode::AndIL_shift_and_mask(PhaseGVN* phase, Node* shift, Node* mask, BasicType bt, bool check_reverse) {
>
> Since this is a boolean function, perhaps its name should indicate what question it is answering.
>
> Suggestion: `AndIL_shift_and_mask_is_always_zero`
I will make that change before I push it.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6876
More information about the hotspot-compiler-dev
mailing list