diff --git a/src/mapleall/maple_me/src/me_rc_lowering.cpp b/src/mapleall/maple_me/src/me_rc_lowering.cpp index 46abe6f56d5a1d747c90204105de4af3a97d0be0..866c4a2496062a42a9e584550647aba63be35f9e 100644 --- a/src/mapleall/maple_me/src/me_rc_lowering.cpp +++ b/src/mapleall/maple_me/src/me_rc_lowering.cpp @@ -171,7 +171,11 @@ IntrinsiccallMeStmt *RCLowering::GetIvarRHSHandleStmt(const MeStmt &stmt) { } // load global into temp and update rhs to temp std::vector opnds; - MIRIntrinsicID rcCallId = ivar->IsVolatile() ? PrepareVolatileCall(stmt, INTRN_MCCLoadRefVol) : INTRN_MCCLoadRef; + bool isRCWeak = ivar->IsRCWeak(); + // @Weak annotation handling + MIRIntrinsicID rcCallId = + ivar->IsVolatile() ? PrepareVolatileCall(stmt, isRCWeak ? INTRN_MCCLoadWeakVol : INTRN_MCCLoadRefVol) + : (isRCWeak ? INTRN_MCCLoadWeak : INTRN_MCCLoadRef); opnds.push_back(&ivar->GetBase()->GetAddrExprBase()); opnds.push_back(irMap.CreateAddrofMeExpr(*ivar)); // rhs is not special, skip