RFR (XS) 8252291: C2: Assignment in conditional in loopUnswitch.cpp
Tobias Hartmann
tobias.hartmann at oracle.com
Tue Aug 25 12:44:17 UTC 2020
Hi Aleksey,
looks good and trivial to me.
Best regards,
Tobias
On 25.08.20 09:34, Aleksey Shipilev wrote:
> Cleanup:
> https://bugs.openjdk.java.net/browse/JDK-8252291
>
> Static code analysis complains there is the assignment in the conditional here. I believe the
> assignment should be explicit here. Code was introduced with JDK-8136725.
>
> diff -r 31de2a59348a src/hotspot/share/opto/loopUnswitch.cpp
> --- a/src/hotspot/share/opto/loopUnswitch.cpp Tue Aug 25 09:27:04 2020 +0200
> +++ b/src/hotspot/share/opto/loopUnswitch.cpp Tue Aug 25 09:29:23 2020 +0200
> @@ -442,7 +442,8 @@
>
> if (iff->in(1)->Opcode() != Op_ConI) {
> return false;
> }
>
> - return _has_reserved = true;
> + _has_reserved = true;
> + return true;
> }
>
> Testing: local builds
>
More information about the hotspot-compiler-dev
mailing list