[all-commits] [llvm/llvm-project] b8d954: [CGP][PAC] Flip PHI and blends when all immediate ...
Anatoly Trosinenko via All-commits
all-commits at lists.llvm.org
Fri Jul 25 03:14:20 PDT 2025
Branch: refs/heads/users/atrosinenko/pauth-codegenprepare-blend
Home: https://github.com/llvm/llvm-project
Commit: b8d95408bf74d1ccd8b45f5e226991ec6e9e0942
https://github.com/llvm/llvm-project/commit/b8d95408bf74d1ccd8b45f5e226991ec6e9e0942
Author: Anatoly Trosinenko <atrosinenko at accesssoftek.com>
Date: 2025-07-25 (Fri, 25 Jul 2025)
Changed paths:
M llvm/lib/CodeGen/CodeGenPrepare.cpp
A llvm/test/Transforms/CodeGenPrepare/AArch64/ptrauth.ll
Log Message:
-----------
[CGP][PAC] Flip PHI and blends when all immediate modifiers are the same
GVN PRE, SimplifyCFG and possibly other passes may hoist the call to
`@llvm.ptrauth.blend` intrinsic, introducing multiple duplicate call
instructions hidden behind a PHI node. This prevents the instruction
selector from generating safer code by absorbing the address and
immediate modifiers into separate operands of AUT, PAC, etc. pseudo
instruction.
This patch makes CodeGenPrepare pass detect when discriminator is
computed as a PHI node with all incoming values being blends with the
same immediate modifier. Each such discriminator value is replaced by a
single blend, whose address argument is computed by a PHI node.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list