[all-commits] [llvm/llvm-project] bb2802: [CGP][PAC] Flip PHI and blends when all immediate ...
Anatoly Trosinenko via All-commits
all-commits at lists.llvm.org
Tue Jul 22 13:22:31 PDT 2025
Branch: refs/heads/users/atrosinenko/pauth-codegenprepare-blend
Home: https://github.com/llvm/llvm-project
Commit: bb28025d6cbca8a4e4504df33f97378ae06b7ebc
https://github.com/llvm/llvm-project/commit/bb28025d6cbca8a4e4504df33f97378ae06b7ebc
Author: Anatoly Trosinenko <atrosinenko at accesssoftek.com>
Date: 2025-07-22 (Tue, 22 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