This is an archive of the discontinued LLVM Phabricator instance.

[AArch64LoadStoreOptimizer] Don't treat write to XZR/WZR as a clobber.
ClosedPublic

Authored by gberry on Nov 21 2016, 10:02 AM.

Details

Summary

When searching for load/store instructions to pair/merge don't treat
writes to WZR/XZR as clobbers since they don't change the value read
from WZR/XZR (which is always 0).

Event Timeline

gberry updated this revision to Diff 78736.Nov 21 2016, 10:02 AM
gberry retitled this revision from to [AArch64LoadStoreOptimizer] Don't treat write to XZR/WZR as a clobber..
gberry updated this object.
gberry added a subscriber: llvm-commits.
junbuml added inline comments.Nov 21 2016, 10:23 AM
test/CodeGen/AArch64/ldst-opt.ll
1559

typo: pariing

1561

I cannot see difference with/without this patch in this test. It appears that there is no instruction between the two stores.

gberry marked an inline comment as done.Nov 21 2016, 10:40 AM
gberry added inline comments.
test/CodeGen/AArch64/ldst-opt.ll
1561

This test is sensitive to changes in instruction scheduling. I can re-write this as a MIR test that just runs the aarch64-ldst optimization to make it more robust.

gberry updated this revision to Diff 78744.Nov 21 2016, 11:20 AM

Fix typo and update test to MIR so it isn't effected by changes in instruction scheduling.

junbuml accepted this revision.Nov 21 2016, 11:49 AM
junbuml edited edge metadata.

LGTM

This revision is now accepted and ready to land.Nov 21 2016, 11:49 AM
mcrosier accepted this revision.Nov 21 2016, 1:38 PM
mcrosier edited edge metadata.
This revision was automatically updated to reflect the committed changes.