[llvm] [InstCombine] Combine ptrauth constant callee into bundle. (PR #94706)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 12 12:04:53 PDT 2024


================
@@ -3665,6 +3665,34 @@ static IntrinsicInst *findInitTrampoline(Value *Callee) {
   return nullptr;
 }
 
+Instruction *InstCombinerImpl::foldPtrAuthConstantCallee(CallBase &Call) {
+  auto *CPA = dyn_cast<ConstantPtrAuth>(Call.getCalledOperand());
+  if (!CPA)
+    return nullptr;
+
+  auto *CalleeF = dyn_cast<Function>(CPA->getPointer()->stripPointerCasts());
----------------
nikic wrote:

Is the stripPointerCasts needed with opaque pointers?

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


More information about the llvm-commits mailing list