RFR(S): 8172145: C2: anti dependence missed because store hidden by membar
martin.doerr at sap.com
Fri Dec 30 13:29:03 UTC 2016
we found a C2 Compiler bug which leads to incorrect reordering of memory accesses on PPC64 due to missing anti-dependency. Details are described here:
Just a remark:
In this case, it would be ok to reorder the load with the membar because the Java Memory Model allows that (normal load followed by volatile load, see ). The problem is that the membar hides the path to the store.
The issue can be fixed by this webrev:
This change enables the path which sets LCA=early for the described situation. Then, the load gets scheduled in the same basic block as the membar (just in front of it).
Please review. I will also need a sponsor, please.
Thanks and best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-compiler-dev