[PATCH] D141190: [CallGraph][FIX] Ensure generic intrinsics are represented in the CG

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 7 11:03:58 PST 2023


jdoerfert added a comment.

In D141190#4033426 <https://reviews.llvm.org/D141190#4033426>, @arsenm wrote:

> Should include the GVN testcase

Good point, I'll add https://godbolt.org/z/qn3YhWEKo



================
Comment at: llvm/lib/Analysis/CallGraph.cpp:102
         const Function *Callee = Call->getCalledFunction();
-        if (!Callee || Callee->isIntrinsic())
-          // Indirect calls of intrinsics are not allowed so no need to check.
-          // We can be more precise here by using TargetArg returned by
-          // Intrinsic::isLeaf.
+        if (!Callee)
           Node->addCalledFunction(Call, CallsExternalNode.get());
----------------
arsenm wrote:
> This is only tangentially related but this misses call targets from constantexpr casted functions, and aliases. I was debugging some issue related to this not long ago
Please fix that independently. Let's keep this about intrinsics.


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

https://reviews.llvm.org/D141190



More information about the llvm-commits mailing list