[llvm-branch-commits] [clang] [llvm] Move {load, store}(llvm.protected.field.ptr) lowering to InstCombine. (PR #186548)

Peter Collingbourne via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Apr 3 17:05:56 PDT 2026


================
@@ -482,98 +482,72 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses(
   return Changed;
 }
 
-static bool expandProtectedFieldPtr(Function &Intr) {
-  Module &M = *Intr.getParent();
+static GlobalValue *getDeactivationSymbol(CallInst *Call) {
+  if (auto Bundle = Call->getOperandBundle(LLVMContext::OB_deactivation_symbol))
+    return cast<GlobalValue>(Bundle->Inputs[0]);
+  return nullptr;
+}
 
-  SmallPtrSet<GlobalValue *, 2> DSsToDeactivate;
+static bool expandPtrauthForEmuPAC(Function &Intr) {
+  Module &M = *Intr.getParent();
+  if (Triple(M.getTargetTriple()).isArm64e())
+    return false;
 
-  Type *Int8Ty = Type::getInt8Ty(M.getContext());
   Type *Int64Ty = Type::getInt64Ty(M.getContext());
-  PointerType *PtrTy = PointerType::get(M.getContext(), 0);
-
-  Function *SignIntr =
-      Intrinsic::getOrInsertDeclaration(&M, Intrinsic::ptrauth_sign, {});
-  Function *AuthIntr =
-      Intrinsic::getOrInsertDeclaration(&M, Intrinsic::ptrauth_auth, {});
 
   auto *EmuFnTy = FunctionType::get(Int64Ty, {Int64Ty, Int64Ty}, false);
----------------
pcc wrote:

Done

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


More information about the llvm-branch-commits mailing list