This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ] Improve handling of backchain offset
ClosedPublic

Authored by jonpa on Dec 12 2020, 4:55 PM.

Details

Summary
  • New function SDValue getBackchainAddress() used by lowerDYNAMIC_STACKALLOC() and lowerSTACKRESTORE() to properly handle the backchain offset also with packed-stack.
  • Make a function getBackchainOffset() for the computation of the backchain and use in three places (NFC).

A new test @f6 in backchain.ll, which is same as @f5 except for using packed-stack. I replaced the offsets as needed and hopefully the test should be correct.

Diff Detail

Event Timeline

jonpa created this revision.Dec 12 2020, 4:55 PM
jonpa requested review of this revision.Dec 12 2020, 4:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 12 2020, 4:55 PM
uweigand accepted this revision.Dec 14 2020, 9:23 AM

This all looks good to me, the test case also looks fine (and the offset match what GCC is doing).

This revision is now accepted and ready to land.Dec 14 2020, 9:23 AM
This revision was automatically updated to reflect the committed changes.