RFR: 8287794: Reverse*VNode::Identity problem [v2]
Aleksey Shipilev
shade at openjdk.org
Mon Jul 25 13:41:06 UTC 2022
On Mon, 25 Jul 2022 13:33:28 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
>> Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8287794: Review comments resolved.
>
> src/hotspot/share/opto/vectornode.cpp line 1864:
>
>> 1862: // OperationV (OperationV X) => X
>> 1863: } else if (!n->is_predicated_vector() && !in1->is_predicated_vector()) {
>> 1864: return in1->in(1);
>
> But this will still trigger the SonarCloud warning originally reported by @shipilev because both if and else branch contain the same code, right? Shouldn't the conditions be merged?
I don't think it would trigger a warning. The original warning, as I understand it, was to say that the *unpredicated* `else` branch is the same. So we were guaranteed to take either of branches, and thus the same code, irrelevant of the predicate. It is not the same here: we now have a third path, going out without entering either branch :)
-------------
PR: https://git.openjdk.org/jdk/pull/9623
More information about the hotspot-compiler-dev
mailing list