This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Mark MVE_VMOV_to_lane_32 as isInsertSubregLike
ClosedPublic

Authored by dmgreen on Jan 26 2021, 3:18 AM.

Details

Summary

This allows the peephole optimizer to know that a MVE_VMOV_to_lane_32 is the same as an insert subreg, allowing it to optimize some redundant lane moves.

Diff Detail

Event Timeline

dmgreen created this revision.Jan 26 2021, 3:18 AM
dmgreen requested review of this revision.Jan 26 2021, 3:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 26 2021, 3:18 AM
SjoerdMeijer added inline comments.Jan 26 2021, 5:13 AM
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
5407

Hm, why this change? Is this a simplification? Don't think I understand this change.

dmgreen added inline comments.Jan 26 2021, 9:39 AM
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
5407

Thanks for taking a look.

VSETLNi32 handles D regs, so ssub_0 or ssub_1. Because MVE_VMOV_to_lane_32 is working on Q regs it can be ssub_2 or ssub_3 as well. There are other places in llvm that assume that ssub_0 + x == ssub_x, so that seems safe to use.

SjoerdMeijer added inline comments.Jan 26 2021, 9:49 AM
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
5407

Ah, okay, thanks, that's all clear now.

LGTM

SjoerdMeijer accepted this revision.Jan 26 2021, 9:49 AM
This revision is now accepted and ready to land.Jan 26 2021, 9:49 AM
This revision was automatically updated to reflect the committed changes.