< prev index next >

src/share/vm/c1/c1_Canonicalizer.cpp

Print this page
rev 9067 : 8139040: Fix initializations before ShouldNotReachHere()

@@ -637,11 +637,11 @@
   const Value l = x->x(); ValueType* lt = l->type();
   const Value r = x->y(); ValueType* rt = r->type();
 
   if (l == r && !lt->is_float_kind()) {
     // pattern: If (a cond a) => simplify to Goto
-    BlockBegin* sux;
+    BlockBegin* sux = NULL;
     switch (x->cond()) {
     case If::eql: sux = x->sux_for(true);  break;
     case If::neq: sux = x->sux_for(false); break;
     case If::lss: sux = x->sux_for(false); break;
     case If::leq: sux = x->sux_for(true);  break;

@@ -682,11 +682,11 @@
         // all successors identical => simplify to: Goto
         set_canonical(new Goto(lss_sux, x->state_before(), x->is_safepoint()));
       } else {
         // two successors differ and two successors are the same => simplify to: If (x cmp y)
         // determine new condition & successors
-        If::Condition cond;
+        If::Condition cond = If::eql;
         BlockBegin* tsux = NULL;
         BlockBegin* fsux = NULL;
              if (lss_sux == eql_sux) { cond = If::leq; tsux = lss_sux; fsux = gtr_sux; }
         else if (lss_sux == gtr_sux) { cond = If::neq; tsux = lss_sux; fsux = eql_sux; }
         else if (eql_sux == gtr_sux) { cond = If::geq; tsux = eql_sux; fsux = lss_sux; }
< prev index next >