[PATCH] D106013: [Verifier] Require same signature for intrinsic calls

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 14 13:58:31 PDT 2021


nikic added a comment.

In D106013#2878226 <https://reviews.llvm.org/D106013#2878226>, @dexonsmith wrote:

>> We probably can't enforce this in general due to unreachable (possibly de-indirected) calls, but I don't see a reason why we can't enforce this for intrinsics at least.
>
> Can you explain in more detail why the verifier couldn't check this in unreachable (possibly de-indirected) calls? Why can't we require transforms to be type-correct here (by calling RAUW with a bitcast, or similar)?

The same reasoning as https://llvm.org/docs/FAQ.html#why-does-instcombine-simplifycfg-turn-a-call-to-a-function-with-a-mismatched-calling-convention-into-unreachable-why-not-make-the-verifier-reject-it applies here, or at least I would assume so.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106013/new/

https://reviews.llvm.org/D106013



More information about the llvm-commits mailing list