RFR: 8304948: [vectorapi] C2 crashes when expanding VectorBox [v2]

Eric Liu eliu at openjdk.org
Thu Apr 20 05:25:43 UTC 2023


On Thu, 20 Apr 2023 03:41:02 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

> But that phi will have an incorrect input, because the return value of this call is used as an input of the transformed phi that uses this node?

the return value of this call is Phi1. Phi1 is used as an input of Phi2 which is used by Phi1 as well. 

The Phi cycle is not an incorrect shape, it's a normal case generated by some simple cases, i.g., I have a test case in this patch.
When expanding VectorBox node, the purpose is to traverse the first input of VectorBox to locate Proj, and replace Proj with some other nodes.  The first input of VectorBox can be a graph, contains Phi (maybe Phi cycle) and Proj.

The process finding and replacing Proj is not in local graph, it creates a new graph at the same time. Return this visited node here is used to maintain that cycle. Besides Proj, nodes in graph should not be changed.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13489#discussion_r1172093284


More information about the hotspot-compiler-dev mailing list