This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][Falkor] Avoid generating STRQro* instructions
ClosedPublic

Authored by gberry on Aug 22 2017, 1:12 PM.

Details

Summary

STRQro* instructions are slower than the alternative ADD/STRQui expanded
instructions on Falkor, so avoid generating them unless we're optimizing
for code size.

Diff Detail

Repository
rL LLVM

Event Timeline

gberry created this revision.Aug 22 2017, 1:12 PM
asb added a subscriber: asb.Aug 22 2017, 1:31 PM

One of the usual AArch64 suspects should confirm, but this looks good to me.

One minor nit: might the comment "Avoid generating STRQro is if it is slow unless we're optimizing for code size" better be placed by the definition of UseSTQro rather than the predicated patterns?

t.p.northover edited edge metadata.Aug 22 2017, 1:47 PM

There should be a test, but other than that only one nit (also with the comment).

lib/Target/AArch64/AArch64InstrInfo.td
2136 ↗(On Diff #112214)

Grammar looks sketchy; drop the first "is"?

gberry updated this revision to Diff 112401.Aug 23 2017, 10:55 AM

Move/fix comment and add test case to address review comments

This revision was automatically updated to reflect the committed changes.