changeset 1277: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 2432acbee618
children 7d236a9688c5
files src/share/vm/opto/loopTransform.cpp
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/opto/loopTransform.cpp	Thu Feb 25 15:55:47 2010 -0800
+++ b/src/share/vm/opto/loopTransform.cpp	Thu Feb 25 22:58:43 2010 -0800
@@ -1785,6 +1785,8 @@
 bool PhaseIdealLoop::is_uncommon_trap_if_pattern(ProjNode *proj, bool must_reason_predicate) {
   Node *in0 = proj->in(0);
   if (!in0->is_If()) return false;
+  // Variation of a dead If node.
+  if (in0->outcnt() < 2)  return false;
   IfNode* iff = in0->as_If();
 
   // we need "If(Conv2B(Opaque1(...)))" pattern for must_reason_predicate