ArraySupport.vectorizedMismatch is a leaf level comparison routine which gets called by various public Java APIs (Arrays.equals, Arrays.mismatch).
Hotspot C2 compiler intrinsifies vectorizedMismatch routine and emits a call to a stub routine which uses vector instruction to compare the inputs.
For small compare operation whose size fits in one vector register i.e. < 32 bytes or <= 64 bytes, compiler can employ partial in-lining technique to emit the fast path code at the call site which does vector comparison under the influence of a predicate register/mask computed a function of comparison length.
If the length of comparison is greater than the vector register size then the slow path comprising of stub call could be taken.
This shall prevent the call overhead associated with stub call which could be significant compared to actual comparison operation for small sized comparisons.
Hotspot C2 compiler intrinsifies vectorizedMismatch routine and emits a call to a stub routine which uses vector instruction to compare the inputs.
For small compare operation whose size fits in one vector register i.e. < 32 bytes or <= 64 bytes, compiler can employ partial in-lining technique to emit the fast path code at the call site which does vector comparison under the influence of a predicate register/mask computed a function of comparison length.
If the length of comparison is greater than the vector register size then the slow path comprising of stub call could be taken.
This shall prevent the call overhead associated with stub call which could be significant compared to actual comparison operation for small sized comparisons.
- relates to
-
JDK-8268292 compiler/intrinsics/VectorizedMismatchTest.java fails with release VMs
- Resolved
-
JDK-8268289 build failure due to missing signed flag in x86 evcmpb instruction
- Resolved
- links to
-
Commit openjdk/jdk/b05c40ca