This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][Windows] Fix the callee-saved registers for swiftcc on Windows/AArch64
ClosedPublic

Authored by hjyamauchi on Jul 11 2023, 12:07 PM.

Details

Summary

Fix a miscompilation crash where swiftself on x20 gets corrupted due to incorrect save/restore at prologue/epilogue.

Diff Detail

Event Timeline

hjyamauchi created this revision.Jul 11 2023, 12:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2023, 12:07 PM
hjyamauchi requested review of this revision.Jul 11 2023, 12:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2023, 12:07 PM
compnerd accepted this revision.Jul 11 2023, 12:53 PM

Thanks for this fix! I think that as long as we have a slightly stronger check to ensure that a store isn't occurring in the case, this should be good.

llvm/test/CodeGen/AArch64/swift-csr-win.ll
18

Should this have something like CHECK-NOT for a stp?

This revision is now accepted and ready to land.Jul 11 2023, 12:53 PM

Added a CHECK-NOT.

hjyamauchi marked an inline comment as done.Jul 12 2023, 10:45 AM
compnerd accepted this revision.Jul 12 2023, 1:07 PM
This revision was landed with ongoing or failed builds.Jul 12 2023, 1:25 PM
This revision was automatically updated to reflect the committed changes.