Index: osprey/be/opt/opt_htable.cxx
===================================================================
--- osprey/be/opt/opt_htable.cxx        (revision 3661)
+++ osprey/be/opt/opt_htable.cxx        (working copy)
@@ -1660,6 +1660,7 @@
   _num_iloadfolds = _num_istorefolds = _num_inputprops = _num_mainprops = _num_shrinks = 0;
   _tracing = Get_Trace( TP_GLOBOPT, CR_DUMP_FLAG );
   _phi_hash_valid = FALSE;
+  _phi_chi_revive = FALSE;
   _pre_temp_id = 0;
 }

@@ -2895,7 +2896,8 @@
        _ssa->Value_number_mu_node(Sym()->Get_mem_mu_node(wn));
        if (! cnode->Live()) {
          _ssa->Resurrect_chi(cnode);
-          cnode->RESULT()->Set_defstmt(dstmt);
+         cnode->RESULT()->Set_defstmt(dstmt);
+         Set_phi_chi_revivie();
        }
         retv = cnode->RESULT();

@@ -2976,8 +2978,10 @@
           Sym()->Aux_stab_entry(vaux)->Bit_size() == WN_bit_size(wn))) {
         base_ccr->Tree()->DecUsecnt(); // for the LDA coderep
        _ssa->Value_number_mu_node(Sym()->Get_mem_mu_node(wn));
-       if (! phi->Live())
+       if (! phi->Live())  {
          _ssa->Resurrect_phi(phi);
+         Set_phi_chi_revivie();
+       }
         retv = phi->RESULT();

        if (retv->Is_flag_set(CF_IS_ZERO_VERSION)) {
Index: osprey/be/opt/opt_main.cxx
===================================================================
--- osprey/be/opt/opt_main.cxx  (revision 3661)
+++ osprey/be/opt/opt_main.cxx  (working copy)
@@ -1595,6 +1595,12 @@

   SET_OPT_PHASE("Create CODEMAP Representation");
   comp_unit->Ssa()->Create_CODEMAP();
+  // if some dead phi/chi is revive in codemap setup (due to ILOAD folding),
+  // need rename to sovle the version overlap problem.
+  if (comp_unit->Htable()->Phi_chi_revive()) {
+    Rename_CODEMAP(comp_unit);
+    comp_unit->Htable()->Reset_phi_chi_revivie();
+  }

   if (Get_Trace(TKIND_INFO, TINFO_TIME)) {
     SET_OPT_PHASE("Skip verify Live-Range because timing trace is on");
Index: osprey/be/opt/opt_htable.h
===================================================================
--- osprey/be/opt/opt_htable.h  (revision 3661)
+++ osprey/be/opt/opt_htable.h  (working copy)
@@ -1511,7 +1511,8 @@
   INT32              _num_mainprops;           // for statistics only (main prop phase)
   INT32              _num_shrinks;             // for statistics only (shrink phase)
   BOOL        _tracing;
-  BOOL                        _phi_hash_valid;
+  BOOL        _phi_hash_valid;
+  BOOL        _phi_chi_revive;  // if phi or chi is revive when setup coderep
   ID_MAP<PHI_NODE *, PHI_KEY> _phi_id_map;

   CODEMAP(void);
@@ -1752,6 +1753,10 @@
   void        Reset_phi_hash_valid(void)   { _phi_hash_valid = FALSE; }
   BOOL        Phi_hash_valid(void)const    { return _phi_hash_valid; }

+  void        Set_phi_chi_revivie(void)     { _phi_chi_revive = TRUE; }
+  void        Reset_phi_chi_revivie(void)   { _phi_chi_revive = FALSE; }
+  BOOL        Phi_chi_revive(void)const    { return _phi_chi_revive; }
+
   //  Enter an expression into the htable
   CODEREP    *Rehash_tree(CODEREP *,
                           BOOL,     // constant prop ?
