File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
hotspot/src/share/vm/opto Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -145,10 +145,18 @@ static Node* split_if(IfNode *iff, PhaseIterGVN *igvn) {
145145 Node* v = u->fast_out (k); // User of the phi
146146 // CNC - Allow only really simple patterns.
147147 // In particular I disallow AddP of the Phi, a fairly common pattern
148- if ( v == cmp ) continue ; // The compare is OK
149- if ( (v->is_ConstraintCast ()) &&
150- v->in (0 )->in (0 ) == iff )
151- continue ; // CastPP/II of the IfNode is OK
148+ if (v == cmp) continue ; // The compare is OK
149+ if (v->is_ConstraintCast ()) {
150+ // If the cast is derived from data flow edges, it may not have a control edge.
151+ // If so, it should be safe to split. But follow-up code can not deal with
152+ // this (l. 359). So skip.
153+ if (v->in (0 ) == NULL ) {
154+ return NULL ;
155+ }
156+ if (v->in (0 )->in (0 ) == iff) {
157+ continue ; // CastPP/II of the IfNode is OK
158+ }
159+ }
152160 // Disabled following code because I cannot tell if exactly one
153161 // path dominates without a real dominator check. CNC 9/9/1999
154162 // uint vop = v->Opcode();
You can’t perform that action at this time.
0 commit comments