[llvm] [ArgPromotion] Consider InvokeInst in Caller alias analysis (PR #110335)
Hari Limaye via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 30 08:08:52 PDT 2024
================
@@ -491,10 +491,8 @@ static bool isArgUnmodifiedByAllCalls(Argument *Arg,
FunctionAnalysisManager &FAM) {
for (User *U : Arg->getParent()->users()) {
- // Bail if we find an unexpected (non CallInst) use of the function.
- auto *Call = dyn_cast<CallInst>(U);
- if (!Call)
- return false;
+ assert(isa<CallBase>(U) && "Expected all users of Function to be CallBase");
+ CallBase *Call = cast<CallBase>(U);
----------------
hazzlim wrote:
Nice - updated to remove the superfluous assert(), and added some tests for invoke instructions.
https://github.com/llvm/llvm-project/pull/110335
More information about the llvm-commits
mailing list