RFR: 8372384: Remove unused local variable in MacroAssembler::sha512_update_sha_state on PPC
wb-ly878512
duke at openjdk.org
Wed Dec 3 23:05:59 UTC 2025
On Mon, 24 Nov 2025 08:05:15 GMT, wb-ly878512 <duke at openjdk.org> wrote:
> Issue
> -----
> https://bugs.openjdk.org/browse/JDK-8372384
> Summary
> -------
> Remove an unused local variable from the PowerPC SHA-512 macro assembler implementation.
> Problem
> -------
> `MacroAssembler::sha512_update_sha_state` in `macroAssembler_ppc_sha.cpp` defines a local constant:
> static const int total_inis = sizeof(inis)/sizeof(VectorRegister);
> which is never used. This triggers static analysis warnings (e.g. “unused variable” / “dead code”) and slightly reduces code clarity, although it has no impact on correctness or runtime behavior.
> The rest of the function relies only on `total_hs` and the implicit relation between `hs` and `inis`. The unused `total_inis` appears to be left over from an earlier version of the code or a refactoring.
> Solution
> --------
> Remove the unused local variable `total_inis` and keep the existing logic unchanged.
> Testing
> -------
> Trivial change. No additional testing.
The contribution is made on behalf of Alibaba.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28472#issuecomment-3569637678
More information about the hotspot-dev
mailing list