[PATCH] D99773: [InstCombine] when calling conventions are compatible, don't convert the call to undef idiom

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 10 00:31:36 PDT 2021


lebedev.ri accepted this revision.
lebedev.ri added a comment.
This revision is now accepted and ready to land.

LGTM, since we were already doing that in SimplifyLibCalls.



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:2121-2122
 
     // If the call and callee calling conventions don't match, this call must
     // be unreachable, as the call is undefined.
+    if ((CalleeF->getCallingConv() != Call.getCallingConv() &&
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99773



More information about the llvm-commits mailing list