This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Handle missing store pair opportunity
ClosedPublic

Authored by junbuml on Mar 29 2016, 1:25 PM.

Details

Summary

This change will handle missing store pair opportunity where the first store
instruction stores zero followed by the non-zero store. For example, this change
will convert :

  
str wzr, [x8]
str w1, [x8, #4]

into:

stp wzr, w1, [x8]

Diff Detail

Event Timeline

junbuml updated this revision to Diff 51970.Mar 29 2016, 1:25 PM
junbuml retitled this revision from to [AArch64] Handle missing store pair opportunity.
junbuml updated this object.
junbuml added a subscriber: llvm-commits.
mcrosier accepted this revision.Mar 30 2016, 7:56 AM
mcrosier edited edge metadata.

LGTM, with a few minor nits.

lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
1608

I tend to add a comment next to boolean arguments (e.g., "/*FindNarrowMerge=*/ true").

1644

/*FindNarrowMerge=*/ false

test/CodeGen/AArch64/arm64-narrow-ldst-merge.ll
355–356

Please put a space between the semicolon and the CHECK directive. Also, please remove the space between the CHECK directive and the colon below. I'm not sure if FileCheck considers "CHECK :" as a directive.

369–370

Please put a space between the semicolon and the CHECK directive.

370

Please put a space between the semicolon and the CHECK directive.

This revision is now accepted and ready to land.Mar 30 2016, 7:56 AM
junbuml updated this revision to Diff 52081.Mar 30 2016, 9:58 AM
junbuml edited edge metadata.

Address Chad's comment.

LGTM, too. with a few minor nits.

lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
1608

Please put a space.

"/*FindNarrowMerge = */ true"

1644

Please put a space /*FindNarrowMerge = */ false.

This revision was automatically updated to reflect the committed changes.