[PATCH] D66047: Do not call replaceAllUsesWith to upgrade calls to ARC runtime functions to intrinsic calls

Akira Hatanaka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 9 18:58:47 PDT 2019


ahatanak created this revision.
ahatanak added reviewers: pete, steven_wu, rjmccall.
ahatanak added a project: LLVM.
Herald added subscribers: dexonsmith, jkorous, hiraditya.

This fixes a bug in r368311.

It turns out that the ARC runtime functions in the IR can have pointer parameter types that are not `i8*` or `i8**`. Instead of calling replaceAllUsesWith, manually bitcast the arguments and return values before and after calling the intrinsic functions.

rdar://problem/54125406


Repository:
  rL LLVM

https://reviews.llvm.org/D66047

Files:
  llvm/lib/IR/AutoUpgrade.cpp
  llvm/test/Bitcode/upgrade-arc-runtime-calls.bc
  llvm/test/Bitcode/upgrade-arc-runtime-calls.ll
  llvm/test/Bitcode/upgrade-mrr-runtime-calls.bc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66047.214493.patch
Type: text/x-patch
Size: 8016 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190810/67c95033/attachment.bin>


More information about the llvm-commits mailing list