RFR(S): 8243670: Unexpected test result caused by C2 MergeMemNode::Ideal
Yangfei (Felix)
felix.yang at huawei.com
Wed Jun 17 12:30:08 UTC 2020
Hi Tobias,
> -----Original Message-----
> From: Tobias Hartmann [mailto:tobias.hartmann at oracle.com]
> Sent: Wednesday, June 17, 2020 4:03 PM
> To: Yangfei (Felix) <felix.yang at huawei.com>; hotspot-compiler-
> dev at openjdk.java.net
> Subject: Re: RFR(S): 8243670: Unexpected test result caused by C2
> MergeMemNode::Ideal
>
> Hi Felix,
>
> On 15.06.20 10:49, Yangfei (Felix) wrote:
> > Sorry for the late reply.
> > Not sure if I understand correctly. Do you mean something like this?
> >
> > diff -r 6ab7805df10d src/hotspot/share/opto/memnode.cpp
> > --- a/src/hotspot/share/opto/memnode.cpp Sat Jun 13 01:00:00 2020
> +0200
> > +++ b/src/hotspot/share/opto/memnode.cpp Mon Jun 15 16:40:57
> 2020 +0800
> > @@ -4618,7 +4618,8 @@
> > }
> > if (phi_mem != NULL) {
> > // equivalent phi nodes; revert to the def
> > - new_mem = new_base;
> > + if (phi_base->adr_type()->higher_equal(phi_mem->adr_type()))
> > + new_mem = new_base;
> > }
> > }
> > }
>
> Yes, that would fix the issue you are seeing, right?
Thanks for confirming that. Yes, this works for the reduced test case.
I see phi_base was calculated from base_memory(). That is in(AliasIdxBot)) which is a "wide" memory state containing all alias categories.
So I was thinking that maybe the condition " phi_base->adr_type()->higher_equal(phi_mem->adr_type())" will always equals false?
If that is true, then this is the same in functionality with my initial patch. Could you please clarify?
Felix
More information about the hotspot-compiler-dev
mailing list