File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -4672,8 +4672,8 @@ class TypePromotionHelper {
46724672 static void addPromotedInst (InstrToOrigTy &PromotedInsts,
46734673 Instruction *ExtOpnd, bool IsSExt) {
46744674 ExtType ExtTy = IsSExt ? SignExtension : ZeroExtension;
4675- InstrToOrigTy::iterator It = PromotedInsts.find (ExtOpnd);
4676- if (It != PromotedInsts. end () ) {
4675+ auto [It, Inserted] = PromotedInsts.try_emplace (ExtOpnd);
4676+ if (!Inserted ) {
46774677 // If the new extension is same as original, the information in
46784678 // PromotedInsts[ExtOpnd] is still correct.
46794679 if (It->second .getInt () == ExtTy)
@@ -4684,7 +4684,7 @@ class TypePromotionHelper {
46844684 // BothExtension.
46854685 ExtTy = BothExtension;
46864686 }
4687- PromotedInsts[ExtOpnd] = TypeIsSExt (ExtOpnd->getType (), ExtTy);
4687+ It-> second = TypeIsSExt (ExtOpnd->getType (), ExtTy);
46884688 }
46894689
46904690 // / Utility function to query the original type of instruction \p Opnd
You can’t perform that action at this time.
0 commit comments