JDK-8188313 : C2: Consider enabling auto-vectorization for simple reductions (disabled by JDK-8078563)
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2017-10-03
  • Updated: 2025-11-20
  • Resolved: 2025-11-20
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.
Other
tbdResolved
Related Reports
Blocks :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
Reconsider the decision to disable autovectorization for simple reductions made by JDK-8078563.

Richard Startin reports [1] that artificially complicating reduction operation (to make it eligible for auto-vectorization) produces a better result than original code (sum of elements). 

[1] http://richardstartin.uk/tricking-java-into-adding-up-arrays-faster/
Comments
Issue JDK-8340093 enables simple reductions now. [~vlivanov] Closing the issue here as a duplicate, let me know if you disagree.
20-11-2025