[llvm] [ArgPromotion] Handle pointer arguments of recursive calls (PR #78735)

Vedant Paranjape via llvm-commits llvm-commits at lists.llvm.org
Fri May 31 06:48:57 PDT 2024


================
@@ -610,13 +610,59 @@ static bool findArgParts(Argument *Arg, const DataLayout &DL, AAResults &AAR,
       // unknown users
     }
 
+    if (IsSelfRecursive && isa<CallBase>(V)) {
+      Value *Ptr = dyn_cast<Value>(U);
----------------
vedantparanjape-amd wrote:

> You also need to check this is actually the callee argument

That's being checked below, right ?

```c
      if (PtrArg != Arg)
        return false;
```

https://github.com/llvm/llvm-project/pull/78735


More information about the llvm-commits mailing list