diff --git a/src/mapleall/maple_be/src/cg/ebo.cpp b/src/mapleall/maple_be/src/cg/ebo.cpp index 6c14a630afb4eb24398a32b189c89183f467c419..258808e83bf2572f4efa862a5091ba75bfe2a5df 100644 --- a/src/mapleall/maple_be/src/cg/ebo.cpp +++ b/src/mapleall/maple_be/src/cg/ebo.cpp @@ -606,7 +606,7 @@ bool Ebo::ForwardPropagateOpnd(Insn &insn, Operand *&opnd, uint32 opndIndex, } /* Copies to and from the same register are not needed. */ if (!beforeRegAlloc && Globals::GetInstance()->GetTarget()->IsEffectiveCopy(insn) && (opndIndex == kInsnSecondOpnd) && - RegistersIdentical(*opnd, insn.GetOperand(kInsnFirstOpnd))) { + RegistersIdentical(*opnd, insn.GetOperand(kInsnFirstOpnd)) && !LiveOutOfBB(*opnd, *(insn.GetBB()))) { if (EBO_DUMP) { LogInfo::MapleLogger() << "===replace operand " << opndIndex << " of insn: \n"; insn.Dump();