Maintenance Notice

The bugs.java.com site will be undergoing maintenance on 15th Dec 2017 21:00 PST to 16th Dec 2017 1:00 AM PST.
JDK-8022993 : Convert MAX_UNROLL constant to LoopMaxUnroll C2 flag
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs25
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2013-08-13
  • Updated: 2014-02-12
  • Resolved: 2013-08-15
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 Availabitlity Release.

To download the current JDK release, click here.
JDK 7 JDK 8 Other
7u60Fixed 8Fixed hs25Fixed
Description
C2 has max unroll limit hard coded:

#define MAX_UNROLL 16 // maximum number of unrolls for main loop

It limits size of vectors (byte vectors) which are used in AVX instructions. There is no feed back from vectorization code to loop unrolling because superword optimization is executed at the end of all loop opts. We can make policy_unroll() method more intelligent to recognize vectorization cases but it is a lot more code changes. For now just use new  LoopMaxUnroll flag instead of MAX_UNROLL constant.
Comments
No need test because just use new LoopMaxUnroll flag instead of MAX_UNROLL constant.
2013-11-19