JDK-8357530 : C2 SuperWord: Diagnostic flag AutoVectorizationOverrideProfitability
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 25
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-05-22
  • Updated: 2025-05-26
  • Resolved: 2025-05-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 25
25 masterFixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
In SuperWord, there are some heuristics that predict the profitability of vectorization. These are not always correct, and we may want to benchmark them thoroughly and improve them in the future.

To facilitate this benchmarking, I propose we add a diagnostic flag:
AutoVectorizationOverrideProfitability
0: never profitable, i.e. abort SuperWord without vectorization
1: Use profitability heuristics to determine profitability
2: ignore profitability heuristic, vectorize anyway (if all correctness checks pass, of course)

This flag will also help us when we are working on the cost model.

And: in some cases, we end up not vectorizing because it is not possible. But the unrolling mechanism behaves different with UseSuperWord enabled and disabled. Sometimes the performance with it enabled is worse than without, because of over-unrolling.
Comments
Changeset: e8eff4d2 Branch: master Author: Emanuel Peter <epeter@openjdk.org> Date: 2025-05-26 18:31:19 +0000 URL: https://git.openjdk.org/jdk/commit/e8eff4d25b984d503a4daa5d291b52a8d1e2f186
26-05-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/25387 Date: 2025-05-22 08:54:42 +0000
23-05-2025