Mercurial > hg > graal-compiler
comparison src/share/vm/opto/ifnode.cpp @ 17936:968a17f18337
8042786: Proper fix for 8032566
Summary: Check for overflow cases in range checks and collapse it if we can.
Reviewed-by: jrose, iveresov
author | kvn |
---|---|
date | Fri, 16 May 2014 12:05:14 -0700 |
parents | 085b304a1cc5 |
children | 52b4284cb496 fb971e09d20f |
comparison
equal
deleted
inserted
replaced
17935:7384f6a12fc1 | 17936:968a17f18337 |
---|---|
671 // / \ | | 671 // / \ | |
672 // / \ | | 672 // / \ | |
673 // / Region | 673 // / Region |
674 // | 674 // |
675 Node* IfNode::fold_compares(PhaseGVN* phase) { | 675 Node* IfNode::fold_compares(PhaseGVN* phase) { |
676 if (!phase->C->eliminate_boxing() || Opcode() != Op_If) return NULL; | 676 if (Opcode() != Op_If) return NULL; |
677 | 677 |
678 Node* this_cmp = in(1)->in(1); | 678 Node* this_cmp = in(1)->in(1); |
679 if (this_cmp != NULL && this_cmp->Opcode() == Op_CmpI && | 679 if (this_cmp != NULL && this_cmp->Opcode() == Op_CmpI && |
680 this_cmp->in(2)->is_Con() && this_cmp->in(2) != phase->C->top()) { | 680 this_cmp->in(2)->is_Con() && this_cmp->in(2) != phase->C->top()) { |
681 Node* ctrl = in(0); | 681 Node* ctrl = in(0); |