RFR(S): 8245047: PPC64 fails jcstress Unsafe (?) memory ordering tests due to C2 (?) bug

Doerr, Martin martin.doerr at sap.com
Mon May 18 13:57:49 UTC 2020


Hi Aleksey,

thanks a lot for verifying my patch.

I'll send a new RFR email with updated synopsis. Please reply to that one if you have further comments.

> Looks fine to me. It is a bit odd to me to see that "normal" loads are matched
> with isync, but it
> seems to fit the rest of ppc64.ad that has two versions of loads,
> unordered/followed_by_acquire
> explicitly excepted.

Well, these loads are not "normal" loads. They are "load.acquire".
C2 uses 2 different things to express acquire semantics:
- The LoadNodes have an attribute _mo which is set to "acquire" instead of "unordered".
- A MemBarAcquireNode is attached to the LoadNode (via precedence edge).

Platform implementors can choose whether to use one or the other.
PPC64 uses empty implementation for MemBarAcquireNode, so the acquire barrier needs to be handled by the LoadNode.
Load with acquire semantics is typically faster than Load + independent acquire barrier on platforms which have instructions (or tricky patterns) to support that.

Best regards,
Martin


> -----Original Message-----
> From: Aleksey Shipilev <shade at redhat.com>
> Sent: Freitag, 15. Mai 2020 18:42
> To: Doerr, Martin <martin.doerr at sap.com>; 'hotspot-compiler-
> dev at openjdk.java.net' <hotspot-compiler-dev at openjdk.java.net>;
> Michihiro Horie (HORIE at jp.ibm.com) <HORIE at jp.ibm.com>;
> joserz at linux.ibm.com; Lindenmaier, Goetz <goetz.lindenmaier at sap.com>
> Subject: Re: RFR(S): 8245047: PPC64 fails jcstress Unsafe (?) memory ordering
> tests due to C2 (?) bug
> 
> On 5/15/20 6:21 PM, Doerr, Martin wrote:
> > Aleksey has reported the issue:
> > https://bugs.openjdk.java.net/browse/JDK-8245047
> 
> Well, I think it is a good idea to change the synopsis. I speculated in the
> provisional synopsis,
> and thought "(?)" would prompt the edit :) Looks to me, it is "[PPC64] C2:
> ReverseBytes(U)S/Load(U)S
> always match to unordered loads".
> 
> > Here's my proposed fix:
> >
> http://cr.openjdk.java.net/~mdoerr/8245047_ppc64_load_reversed_acquir
> e/webrev.00/
> 
> Looks fine to me. It is a bit odd to me to see that "normal" loads are matched
> with isync, but it
> seems to fit the rest of ppc64.ad that has two versions of loads,
> unordered/followed_by_acquire
> explicitly excepted.
> 
> > I'd appreciate retesting, too, if possible.
> 
> I'll run a few jcstress tests here.
> 
> --
> Thanks,
> -Aleksey



More information about the hotspot-compiler-dev mailing list