This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Don't drop MMOs in the load/store optimizer when forming ldp/stp instructions or pre-/post-index loads/stores.
ClosedPublic

Authored by mcrosier on Jan 20 2016, 12:22 PM.

Details

Summary

Without this change I believe the mi scheduler treats these transformed loads/stores as scheduling barriers. Therefore, I don't think we want to just drop the MMOs.

Chad

Diff Detail

Event Timeline

mcrosier updated this revision to Diff 45431.Jan 20 2016, 12:22 PM
mcrosier retitled this revision from to [AArch64] Don't drop MMOs in the load/store optimizer when forming ldp/stp instructions or pre-/post-index loads/stores..
mcrosier updated this object.
mcrosier added reviewers: reames, MatzeB, jmolloy.
mcrosier added subscribers: llvm-commits, gberry.
gberry added inline comments.Jan 20 2016, 12:53 PM
lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
1269

For consistency, could you change this to drop the "MIB->" and just build off the above expr as was done in the change above?

1279

Ditto

mcrosier updated this revision to Diff 45455.Jan 20 2016, 3:23 PM
mcrosier updated this object.

Address Geoff's comments.

mcrosier marked 2 inline comments as done.Jan 20 2016, 3:23 PM

Looks like this change is exposing a correctness issue in the MI scheduler. Investigating..

mcrosier accepted this revision.Jan 28 2016, 7:17 AM
mcrosier added a reviewer: mcrosier.

Per Junmo. I'm going to defer the part that adds the MMOs to the unscaled pairs until D8705 lands.

This revision is now accepted and ready to land.Jan 28 2016, 7:17 AM

Can't all the other added memref cases also potentially run into the scheduler bug you're seeing?

Can't all the other added memref cases also potentially run into the scheduler bug you're seeing?

It's not a problem in this case because we're just copying a single MMO from the ldr/str to the pre-/post-index equivalent. We run into problems only with the paired instructions where we have multiple MMOs.

mcrosier closed this revision.Jan 28 2016, 8:47 AM

Committed r259052.