Page MenuHomePhabricator

[SROA] Bail out on PHIs in catchswitch BBs
ClosedPublic

Authored by aheejin on Wed, Jan 12, 3:38 PM.

Details

Summary

In the process of rewriting allocas and phis that use them, the SROA
pass can try to insert a non-PHI instruction by calling
getFirstInsertionPt(), which is not possible in a catchswitch BB. This
CL makes we bail out on these cases.

Diff Detail

Event Timeline

aheejin created this revision.Wed, Jan 12, 3:38 PM
aheejin requested review of this revision.Wed, Jan 12, 3:38 PM
Herald added a project: Restricted Project. · View Herald TranscriptWed, Jan 12, 3:38 PM
aheejin edited the summary of this revision. (Show Details)Wed, Jan 12, 3:39 PM
lebedev.ri requested changes to this revision.Thu, Jan 13, 12:54 AM
lebedev.ri added a subscriber: lebedev.ri.
lebedev.ri added inline comments.
llvm/test/Transforms/SROA/phi-catchswitch.ll
2

There is no run line in this test, so it doesn't actually test anything.

This revision now requires changes to proceed.Thu, Jan 13, 12:54 AM
aheejin updated this revision to Diff 399759.Thu, Jan 13, 1:05 PM

Add RUN line + checks

aheejin marked an inline comment as done.Thu, Jan 13, 1:06 PM
aheejin added inline comments.
llvm/test/Transforms/SROA/phi-catchswitch.ll
2

Oh right.. Added it, thanks.

aheejin updated this revision to Diff 399785.Thu, Jan 13, 2:14 PM
aheejin marked an inline comment as done.

Add CHECK-LABEL

aheejin updated this revision to Diff 399849.Thu, Jan 13, 5:19 PM

Add preds comments to test

aheejin edited the summary of this revision. (Show Details)Fri, Jan 14, 11:41 AM
dschuff accepted this revision.Fri, Jan 14, 2:47 PM

Thanks for fixing this.

This revision was not accepted when it landed; it landed in state Needs Review.Fri, Jan 14, 2:55 PM
This revision was automatically updated to reflect the committed changes.