In case PredBB == BB and StopAt == BB's terminator, StopAt != &*BI will
fail, because BB's terminator instruction gets replaced.
By using BB.getTerminator() we get the current terminator which we can use to compare.
Differential D43822
[CloneFunction] Support BB == PredBB in DuplicateInstructionsInSplit. fhahn on Feb 27 2018, 8:19 AM. Authored by
Details In case PredBB == BB and StopAt == BB's terminator, StopAt != &*BI will By using BB.getTerminator() we get the current terminator which we can use to compare.
Diff Detail
Event TimelineComment Actions Just want to make sure if this is the only case where StopAt is changed in the middle ?
Comment Actions AFAIK this is the only case due to how SplitEdge behaves when BB == PredBB. The other instructions should not be moved around while splitting.
Comment Actions LGTM
|