提交 e365db48 编写于 作者: K kvn

6883468: C2 compiler enters infinite loop in PhaseIterGVN::transform

Summary: Avoid ideal transformation ping-pong between AddPNode::Ideal() and CastX2PNode::Ideal().
Reviewed-by: cfang
上级 0a43c8bc
...@@ -1085,6 +1085,9 @@ Node *CastX2PNode::Ideal(PhaseGVN *phase, bool can_reshape) { ...@@ -1085,6 +1085,9 @@ Node *CastX2PNode::Ideal(PhaseGVN *phase, bool can_reshape) {
switch (op) { switch (op) {
case Op_SubX: case Op_SubX:
x = in(1)->in(1); x = in(1)->in(1);
// Avoid ideal transformations ping-pong between this and AddP for raw pointers.
if (phase->find_intptr_t_con(x, -1) == 0)
break;
y = in(1)->in(2); y = in(1)->in(2);
if (fits_in_int(phase->type(y), true)) { if (fits_in_int(phase->type(y), true)) {
return addP_of_X2P(phase, x, y, true); return addP_of_X2P(phase, x, y, true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册