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

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 14 15:22:23 PDT 2021


dexonsmith added a comment.

In D106013#2878499 <https://reviews.llvm.org/D106013#2878499>, @nikic wrote:

> @dexonsmith I don't think upholding invariants during transforms is really the problem here. The problem is that something like this is legal C code:
>
>   extern void one_arg(unsigned);
>   int main() {
>       if (0) {
>           ((void(*)(void)) one_arg)();
>       }
>       return 0;
>   }
>
> With opaque pointers (where there are no pointer bitcasts) this is going to lower to a call that has a different signature from the callee. We can't make that a verifier error.

Right, no pointer bitcasts at all -- I was somehow thinking there were still pointer-to-function bitcasts (just fewer of them, since pointers were collapsed in their parameter lists). Thanks for walking me through it.


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