JDK-8145313 : Remove workarounds after JDK-6675699 was fixed
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9,10
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2015-12-14
  • Updated: 2018-02-14
  • Resolved: 2018-02-14
Related Reports
Relates :  
Description
After JDK-6675699 was fixed, we should remove the following old "workaround-fixes":
https://bugs.openjdk.java.net/browse/JDK-4781451
https://bugs.openjdk.java.net/browse/JDK-4799512
https://bugs.openjdk.java.net/browse/JDK-6659207
https://bugs.openjdk.java.net/browse/JDK-6663854
For reference, the individual patches can be found here:
http://cr.openjdk.java.net/~thartmann/6675699/backouts/

Without the fix for JDK-6659207, we may now split ConvI2L nodes through a Phi node (see PhaseIdealLoop::split_thru_phi()) and as a result the AddP (2080) used for the array address computation may have a Phi node (2617) instead of a ConvI2L node (1984) as input (see graph before [1] and after [2] the optimization). This confuses the superword optimization if we try to vectorize an inner loop (1944) and the invariant part of the address expression is dependent on the outer loop (2529). We should change the superword code to emit a ConvL2I node in this case:

2993   Node* offsn  = _igvn.intcon(offset);
2994   Node* invar  = align_to_ref_p.invar();
2995 
2996   Node* e = offsn;
2997   if (invar != NULL) {
2998 #ifdef _LP64
2999     // If ConvI2L was split through a phi, invar may be of type long
3000     if (_igvn.type(invar)->isa_long() != NULL) {
3001       invar = new ConvL2INode(invar);
3002       _igvn.register_new_node_with_optimizer(invar);
3003     }
3004 #endif
3005     // incorporate any extra invariant piece producing (offset +/- invar) >>> log2(elt)
3006     Node* log2_elt = _igvn.intcon(exact_log2(elt_size));
3007     Node* aref     = new URShiftINode(invar, log2_elt);

[1] http://cr.openjdk.java.net/~thartmann/6675699/split_thru_phi_before.png
[2] http://cr.openjdk.java.net/~thartmann/6675699/split_thru_phi_after.png
Comments
Closing this as Won't Fix because performance evaluation showed regressions.
14-02-2018