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:58 UTC 2025


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.

-------------

Commit messages:
 - 8372384: Remove unused local variable in MacroAssembler::sha512_update_sha_state on PPC

Changes: https://git.openjdk.org/jdk/pull/28472/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28472&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8372384
  Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/28472.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28472/head:pull/28472

PR: https://git.openjdk.org/jdk/pull/28472


More information about the hotspot-dev mailing list