[BOLT] Fix N-1'th sctc bug.
Summary: The logic to append an unconditional branch at the end of a block that had the condition flipped on its conditional tail was broken. It should have been looking at the successor to PredBB instead of BB. It also wasn't skipping invalid blocks when finding the fallthrough block. This fixes the SCTC bug uncovered by @spupyrev's work on block reordering. (cherry picked from FBD6269493)
Loading
Please sign in to comment