RFR(S): 8243670: Unexpected test result caused by C2 MergeMemNode::Ideal
Yangfei (Felix)
felix.yang at huawei.com
Mon Jun 15 08:49:35 UTC 2020
Hi Tobias,
> -----Original Message-----
> From: Tobias Hartmann [mailto:tobias.hartmann at oracle.com]
> Sent: Tuesday, May 26, 2020 10:24 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,
>
> thanks for the details, makes sense to me.
>
> Isn't the root cause that we are loosing type information and wouldn't that
> be solved by selecting the Phi with the more restrictive _adr_type?
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;
}
}
}
Thanks,
Felix
More information about the hotspot-compiler-dev
mailing list