[llvm] [AArch64][PAC] Lower direct authenticated calls to ptrauth constants. (PR #97664)

Daniil Kovalev via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 4 02:24:58 PDT 2024


================
@@ -9374,6 +9374,14 @@ void SelectionDAGBuilder::LowerCallSiteWithPtrAuthBundle(
   assert(Discriminator->getType()->isIntegerTy(64) &&
          "Invalid ptrauth discriminator");
 
+  // Look through ptrauth constants to find the raw callee.
+  // Do a direct unauthenticated call if we found it and everything matches.
+  if (auto *CalleeCPA = dyn_cast<ConstantPtrAuth>(CalleeV))
----------------
kovdan01 wrote:

```suggestion
  if (const auto *CalleeCPA = dyn_cast<ConstantPtrAuth>(CalleeV))
```

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


More information about the llvm-commits mailing list