[llvm] [ArgPromotion] Handle pointer arguments of recursive calls (PR #78735)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 12 06:44: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()) {
----------------
arsenm wrote:
The call and the function have separate types that do not match:
```
declare float @ret_float()
define i32 @call_as_i32() {
%val = call i32 @ret_float()
ret i32 %val
}
```
https://github.com/llvm/llvm-project/pull/78735
More information about the llvm-commits
mailing list