RFR(S): 8172145: C2: anti dependence missed because store hidden by membar
Doerr, Martin
martin.doerr at sap.com
Fri Dec 30 13:29:03 UTC 2016
Hi,
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:
https://bugs.openjdk.java.net/browse/JDK-8172145
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 [1]). The problem is that the membar hides the path to the store.
The issue can be fixed by this webrev:
http://cr.openjdk.java.net/~mdoerr/8172145_C2_antidep/webrev.00/
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,
Martin
[1] http://g.oswego.edu/dl/jmm/cookbook.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20161230/5f0f8f77/attachment.html>
More information about the hotspot-compiler-dev
mailing list