While doing the c2 TOI for the GC team I was surprised by an arraycopy clone that was eliminated with G1 but not with ZGC.
Further investigation revealed that array_copy_requires_gc_barriers has been interpreted too strict. During parse and optimization phase it should return false - no special handling is needed. When deconstructing an arraycopy the proper barriers are added to the loads.
Only during expansion, when the the correct arraycopy call must be used, must array_copy_requires_gc_barriers return true.
Further investigation revealed that array_copy_requires_gc_barriers has been interpreted too strict. During parse and optimization phase it should return false - no special handling is needed. When deconstructing an arraycopy the proper barriers are added to the loads.
Only during expansion, when the the correct arraycopy call must be used, must array_copy_requires_gc_barriers return true.
- relates to
-
JDK-8268632 Regression >2% in SPECjvm2008-XML.transform-ZGC after JDK-8267726
-
- Closed
-
-
JDK-8268125 ZGC: Clone oop array gets wrong acopy stub
-
- Closed
-