This is an archive of the discontinued LLVM Phabricator instance.

[ObjCARC] Account for catchswitch in bitcast insertion
ClosedPublic

Authored by smeenai on May 3 2018, 4:54 PM.

Details

Summary

A catchswitch is both a pad and a terminator, meaning it must be the
only non-phi instruction in its basic block. When we're inserting a
bitcast in the incoming basic block for a phi, if that incoming block is
a catchswitch, we should go up the dominator tree to find a valid
insertion point rather than attempting to insert before the catchswitch
(which would result in invalid IR).

Diff Detail

Repository
rL LLVM

Event Timeline

smeenai created this revision.May 3 2018, 4:54 PM
rjmccall accepted this revision.May 3 2018, 10:45 PM

Okay, LGTM.

This revision is now accepted and ready to land.May 3 2018, 10:45 PM
This revision was automatically updated to reflect the committed changes.