Skip to content

Commit 4b8c484

Browse files
committed
Sink
1 parent 5d52ad8 commit 4b8c484

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/CodeGen/PeepholeOptimizer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1037,8 +1037,9 @@ bool PeepholeOptimizer::findNextSource(RegSubRegPair RegSubReg,
10371037
// Insert the Def -> Use entry for the recently found source.
10381038
auto [InsertPt, WasInserted] = RewriteMap.try_emplace(CurSrcPair, Res);
10391039

1040-
ValueTrackerResult CurSrcRes = InsertPt->second;
10411040
if (!WasInserted) {
1041+
ValueTrackerResult CurSrcRes = InsertPt->second;
1042+
10421043
assert(CurSrcRes == Res && "ValueTrackerResult found must match");
10431044
// An existent entry with multiple sources is a PHI cycle we must avoid.
10441045
// Otherwise it's an entry with a valid next source we already found.

0 commit comments

Comments
 (0)