This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Keep track of MIFlags in the LoadStoreOptimizer
ClosedPublic

Authored by thegameg on Mar 13 2018, 1:09 PM.

Details

Summary

Merging:

  • $x26, $x25 = frame-setup LDPXi $sp, 0
  • $sp = frame-destroy ADDXri $sp, 64, 0

into an LDPXpost should preserve the flags from both instructions as following:

  • frame-setup frame-destroy LDPXpost

Diff Detail

Repository
rL LLVM

Event Timeline

thegameg created this revision.Mar 13 2018, 1:09 PM
junbuml added inline comments.
test/CodeGen/AArch64/ldst-miflags.mir
8 ↗(On Diff #138251)

It would be good to have one more test case for non-pair case like LDRXui.

thegameg updated this revision to Diff 138267.Mar 13 2018, 2:46 PM
thegameg added a reviewer: junbuml.
thegameg marked an inline comment as done.

Should we do this only in mergeUpdateInsn? What about other merges like mergePairedInsns ?

thegameg updated this revision to Diff 138374.Mar 14 2018, 8:41 AM

Handle (hopefully) all the different cases.

junbuml accepted this revision.Mar 14 2018, 10:07 AM
This revision is now accepted and ready to land.Mar 14 2018, 10:07 AM
This revision was automatically updated to reflect the committed changes.