[all-commits] [llvm/llvm-project] 34e5a7: [InstCombine] Combine ptrauth constants into ptrau...
Ahmed Bougacha via All-commits
all-commits at lists.llvm.org
Wed Jun 26 18:55:01 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 34e5a71b3219391309eb498a55e4d49831e1f9ab
https://github.com/llvm/llvm-project/commit/34e5a71b3219391309eb498a55e4d49831e1f9ab
Author: Ahmed Bougacha <ahmed at bougacha.org>
Date: 2024-06-26 (Wed, 26 Jun 2024)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
M llvm/test/Transforms/InstCombine/ptrauth-intrinsics.ll
Log Message:
-----------
[InstCombine] Combine ptrauth constants into ptrauth intrinsics. (#94705)
When we encounter two consecutive ptrauth intrinsics, we can already
combine the inner matching sign + auth pair, e.g.:
resign(sign(p,ks,ds),ks,ds,kr,dr) -> sign(p,kr,dr)
We can generalize that to ptrauth constants, which are effectively
constant equivalents to ptrauth.sign, i.e.:
resign(ptrauth(p,ks,ds),ks,ds,kr,dr) -> ptrauth(p,kr,dr)
auth(ptrauth(p,k,d),k,d) -> p
While there, cleanup a redundant return after eraseInstFromFunction in
the shared (intrinsic|constant)->intrinsic folding code.
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