llvm-project
b8d95408 - [CGP][PAC] Flip PHI and blends when all immediate modifiers are the same

Commit
269 days ago
[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.
Author
Committer
Parents
Loading