Skip to content

Commit bea329e

Browse files
vidsinghalVidush Singhal
andauthored
[Attributor]: allow more than one offset for a pass through user in AAPointerInfo (#94416)
Co-authored-by: Vidush Singhal <[email protected]>
1 parent c6049e6 commit bea329e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

llvm/lib/Transforms/IPO/AttributorAttributes.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1608,11 +1608,15 @@ ChangeStatus AAPointerInfoFloating::updateImpl(Attributor &A) {
16081608
//
16091609
// The RHS is a reference that may be invalidated by an insertion caused by
16101610
// the LHS. So we ensure that the side-effect of the LHS happens first.
1611+
1612+
assert(OffsetInfoMap.contains(CurPtr) &&
1613+
"CurPtr does not exist in the map!");
1614+
16111615
auto &UsrOI = OffsetInfoMap[Usr];
16121616
auto &PtrOI = OffsetInfoMap[CurPtr];
16131617
assert(!PtrOI.isUnassigned() &&
16141618
"Cannot pass through if the input Ptr was not visited!");
1615-
UsrOI = PtrOI;
1619+
UsrOI.merge(PtrOI);
16161620
Follow = true;
16171621
return true;
16181622
};

0 commit comments

Comments
 (0)