Commits

Michael Gottesman committed ac3024292bd
[simplify-cfg] When moving cond_fail to preds, do not bail early. This commit fixes a bug where we were not checking that all predecessors had the cond_fail block as its only successor. This occured since we were bailing early when we saw a constant. So if we saw a predecessor with a constant before a predecessor that had multiple successors, we would optimize even though we would be introducing an extra cond_fail along a path. I added a new utility pass to test this code since so much is going on in SimplifyCFG that it is difficult to construct a test case running the full pass. Really this code should be in a different pass (properly SIL Code Motion TBH). But for now, this commit just fixes the bug. rdar://26904047