RFR: 8283187: C2: loop candidate for superword not always unrolled fully if superword fails

Roland Westrelin roland at openjdk.java.net
Tue Mar 15 16:00:26 UTC 2022


IdealLoopTree::policy_unroll_slp_analysis() restricts unrolling of
loops that are found to be candidate for superword but if superword
then fails, unrolling doesn't always resume. SuperWord::output() has
logic for that in one of the failure paths but some other paths are
not covered (for instance in the case of the test case). I propose
that superword explictly returns whether it succeeded or not and that
in case of failure, for a main loop, unrolling be attempted again.

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

Commit messages:
 - whitespaces
 - fix & test

Changes: https://git.openjdk.java.net/jdk/pull/7822/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7822&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8283187
  Stats: 122 lines in 5 files changed: 77 ins; 6 del; 39 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7822.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7822/head:pull/7822

PR: https://git.openjdk.java.net/jdk/pull/7822


More information about the hotspot-compiler-dev mailing list