================ @@ -1035,8 +1035,10 @@ bool PeepholeOptimizer::findNextSource(RegSubRegPair RegSubReg, return false; // Insert the Def -> Use entry for the recently found source. - ValueTrackerResult CurSrcRes = RewriteMap.lookup(CurSrcPair); - if (CurSrcRes.isValid()) { + auto [InsertPt, WasInserted] = RewriteMap.try_emplace(CurSrcPair, Res); + + ValueTrackerResult CurSrcRes = InsertPt->second; ---------------- jayfoad wrote:
Sink this inside the "if" https://github.com/llvm/llvm-project/pull/124531 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits