comparison src/share/vm/opto/loopTransform.cpp @ 1280:336c6c200f5f

6930116: loop predication code does not handle If nodes with only one projection Summary: Add check for iff->outcnt() < 2. Reviewed-by: never
author kvn
date Thu, 25 Feb 2010 22:58:43 -0800
parents b71f13525cc8
children c047da02984c
comparison
equal deleted inserted replaced
1279:2432acbee618 1280:336c6c200f5f
1783 // 1783 //
1784 // "must_reason_predicate" means the uct reason must be Reason_predicate 1784 // "must_reason_predicate" means the uct reason must be Reason_predicate
1785 bool PhaseIdealLoop::is_uncommon_trap_if_pattern(ProjNode *proj, bool must_reason_predicate) { 1785 bool PhaseIdealLoop::is_uncommon_trap_if_pattern(ProjNode *proj, bool must_reason_predicate) {
1786 Node *in0 = proj->in(0); 1786 Node *in0 = proj->in(0);
1787 if (!in0->is_If()) return false; 1787 if (!in0->is_If()) return false;
1788 // Variation of a dead If node.
1789 if (in0->outcnt() < 2) return false;
1788 IfNode* iff = in0->as_If(); 1790 IfNode* iff = in0->as_If();
1789 1791
1790 // we need "If(Conv2B(Opaque1(...)))" pattern for must_reason_predicate 1792 // we need "If(Conv2B(Opaque1(...)))" pattern for must_reason_predicate
1791 if (must_reason_predicate) { 1793 if (must_reason_predicate) {
1792 if (iff->in(1)->Opcode() != Op_Conv2B || 1794 if (iff->in(1)->Opcode() != Op_Conv2B ||