8042786: Proper fix for 8032566

Check for overflow cases in range checks and collapse it if we can.

Reviewed-by: jrose, iveresov
This commit is contained in:
Vladimir Kozlov 2014-05-16 12:05:14 -07:00
parent a354960abb
commit 6bfc0288f3
7 changed files with 101 additions and 5 deletions

View file

@ -673,7 +673,7 @@ const TypeInt* IfNode::filtered_int_type(PhaseGVN* gvn, Node *val, Node* if_proj
// / Region
//
Node* IfNode::fold_compares(PhaseGVN* phase) {
if (!phase->C->eliminate_boxing() || Opcode() != Op_If) return NULL;
if (Opcode() != Op_If) return NULL;
Node* this_cmp = in(1)->in(1);
if (this_cmp != NULL && this_cmp->Opcode() == Op_CmpI &&