[PATCH] D46412: [ObjCARC] Account for catchswitch in bitcast insertion

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 3 16:55:18 PDT 2018


smeenai created this revision.
smeenai added reviewers: ahatanak, rjmccall.

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).


Repository:
  rL LLVM

https://reviews.llvm.org/D46412

Files:
  lib/Transforms/ObjCARC/ObjCARCContract.cpp
  test/Transforms/ObjCARC/contract-catchswitch.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46412.145118.patch
Type: text/x-patch
Size: 4747 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180503/b1b8193a/attachment.bin>


More information about the llvm-commits mailing list