This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Combine ptrauth sign/resign + auth/resign intrinsics.
ClosedPublic

Authored by ab on Aug 22 2022, 8:55 AM.

Details

Summary

Quoting the comment:

(sign|resign) + (auth|resign) can be folded by omitting the middle
sign+auth component if the key and discriminator match.

Diff Detail

Event Timeline

ab created this revision.Aug 22 2022, 8:55 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: hiraditya. · View Herald Transcript
ab requested review of this revision.Aug 22 2022, 8:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 22 2022, 8:55 AM
apazos added inline comments.Aug 23 2022, 11:35 AM
llvm/test/Transforms/InstCombine/ptrauth-intrinsics.ll
12

missing test cases for the combo resign - auth just like you have for the combo sign - auth

ab updated this revision to Diff 456782.Aug 30 2022, 1:30 PM
ab marked an inline comment as done.
  • add test for resign+auth -> auth
llvm/test/Transforms/InstCombine/ptrauth-intrinsics.ll
12

Good catch, added!

kristof.beyls accepted this revision.Oct 5 2022, 5:21 AM

LGTM, thanks!

This revision is now accepted and ready to land.Oct 5 2022, 5:21 AM
This revision was landed with ongoing or failed builds.Oct 24 2022, 8:03 AM
This revision was automatically updated to reflect the committed changes.