This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Add unpredicated ld1/st1 patterns for reg+reg addressing modes
ClosedPublic

Authored by bsmith on Jan 29 2021, 5:36 AM.

Details

Diff Detail

Event Timeline

bsmith created this revision.Jan 29 2021, 5:36 AM
bsmith requested review of this revision.Jan 29 2021, 5:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 29 2021, 5:36 AM
Matt added a subscriber: Matt.Feb 3 2021, 5:53 AM
bsmith updated this revision to Diff 327777.Mar 3 2021, 6:50 AM
bsmith edited the summary of this revision. (Show Details)
  • Remove LICM vscale intrinsic changes
  • Update tests to disable LSR to check vscale folding.
paulwalker-arm added inline comments.Mar 10 2021, 4:32 AM
llvm/test/CodeGen/AArch64/sve-ld1-addressing-mode-reg-imm.ll
141–156

These tests look more complex than necessary for the ISel patterns they're exercising. Is something akin to the following not sufficient?

define <vscale x 16 x i8> @ld1b_reg(i8* %base, i64 %off) {
 %ptr = getelementptr inbounds i8, i8*%base, i64 %off
 %ptrcast = bitcast i8* %ptr to <vscale x 16 x i8>*
 %val = load <vscale x 16 x i8>, <vscale x 16 x i8>* %ptrcast
 ret %val
llvm/test/CodeGen/AArch64/sve-st1-addressing-mode-reg-imm.ll
169

Same comment as for the loads.

bsmith updated this revision to Diff 329658.Mar 10 2021, 7:25 AM
  • Simplify new addressing mode tests
bsmith marked 2 inline comments as done.Mar 10 2021, 7:26 AM
bsmith added inline comments.
llvm/test/CodeGen/AArch64/sve-ld1-addressing-mode-reg-imm.ll
141–156

Yep, it is. This is somewhat of a hang-up from when I was messing with vscale in LICM.

Sorry I didn't mention this as part of my previous review but there should really be a test for each isel pattern. These do exist for the imm variants, it is just they were added to spillfill-sve.ll instead of sve-ld1-addressing-mode-reg-imm.ll. Given the name of the existing test file and the quantity of the new tests perhaps it is worth creating sve-ld1-addressing-mode-reg-reg.ll?

bsmith updated this revision to Diff 329919.Mar 11 2021, 4:13 AM
bsmith marked an inline comment as done.
  • Split reg+reg tests from reg+imm tests
  • Add more reg+reg tests to cover all patterns
paulwalker-arm accepted this revision.Mar 14 2021, 3:50 AM
This revision is now accepted and ready to land.Mar 14 2021, 3:50 AM
bsmith updated this revision to Diff 330598.Mar 15 2021, 3:48 AM
  • Fix test failure in named-vector-shuffles-sve.ll