This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Add custom store lowering for 256 bit non-temporal stores.
ClosedPublic

Authored by fhahn on Jan 17 2020, 6:21 AM.

Details

Summary

Currently we fail to lower non-termporal stores for 256+ bit vectors
to STNPQ, because type legalization will split them up to 128 bit stores
and because there are no single non-temporal stores, creating STPNQ
in the Load/Store optimizer would be quite tricky.

This patch adds custom lowering for 256 bit non-temporal vector stores
to improve the generated code.

Diff Detail

Event Timeline

fhahn created this revision.Jan 17 2020, 6:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 17 2020, 6:21 AM

Unit tests: pass. 61937 tests passed, 0 failed and 783 were skipped.

clang-tidy: unknown.

clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch.

Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

dmgreen added inline comments.Jan 18 2020, 2:28 AM
llvm/lib/Target/AArch64/AArch64InstrInfo.td
2739

Should this be simm7s16? Same for am_indexed7s128

llvm/test/CodeGen/AArch64/nontemporal.ll
361

Should halves work too?

372

Nit: There's an extra " " here it seems

fhahn updated this revision to Diff 239022.Jan 19 2020, 8:22 PM
fhahn marked 3 inline comments as done.

Thanks for taking a look @dmgreen. I've fixed the offset arguments and added the missing v16f16 handler.

fhahn added inline comments.Jan 19 2020, 8:25 PM
llvm/lib/Target/AArch64/AArch64InstrInfo.td
2739

Yes! I've updated that and now the offsets should be correct.

llvm/test/CodeGen/AArch64/nontemporal.ll
361

Yes, I've added the missing handler for v16f16.

Unit tests: pass. 62002 tests passed, 0 failed and 783 were skipped.

clang-tidy: unknown.

clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch.

Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

dmgreen accepted this revision.Jan 20 2020, 10:51 AM

LGTM. Thanks

This revision is now accepted and ready to land.Jan 20 2020, 10:51 AM
This revision was automatically updated to reflect the committed changes.
fhahn added a comment.Jan 21 2020, 3:07 PM

Thanks Dave!