[llvm] [ArgPromotion] Handle pointer arguments of recursive calls (PR #78735)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 12 01:27:23 PDT 2024
================
@@ -611,6 +639,33 @@ static bool findArgParts(Argument *Arg, const DataLayout &DL, AAResults &AAR,
// unknown users
}
+ auto *CB = dyn_cast<CallBase>(V);
+ Value *PtrArg = cast<Value>(U);
+ if (CB && PtrArg && CB->getCalledFunction() == CB->getFunction()) {
----------------
nikic wrote:
This should probably also check that the function type of the call and function match? I wouldn't want to reason about how the arguments map if this is not the case.
https://github.com/llvm/llvm-project/pull/78735
More information about the llvm-commits
mailing list