Page MenuHomePhabricator

[ARM] Add MVE insert-of-extract pattern
ClosedPublic

Authored by dmgreen on Jan 26 2021, 1:34 AM.

Details

Summary

A v4i32 insert of an extract can become a simple lane move, as opposed to round-tripping via a GPR. This adds a patterns that turns an v4i32 insert-extract pair into a EXTRACT_SUBREG/INSERT_SUBREG, with the required COPY_TO_REGCLASS. These get better optimized into a simple lane move by the rest of the backed.

Diff Detail

Event Timeline

dmgreen created this revision.Jan 26 2021, 1:34 AM
dmgreen requested review of this revision.Jan 26 2021, 1:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 26 2021, 1:34 AM
SjoerdMeijer accepted this revision.Jan 26 2021, 5:16 AM

Looks like a nice change to me.

llvm/lib/Target/ARM/ARMInstrMVE.td
1857

Nit: looks like there is a precedent above, and that this is exceeding 80 columns.

This revision is now accepted and ready to land.Jan 26 2021, 5:16 AM
dmgreen added inline comments.Jan 26 2021, 9:38 AM
llvm/lib/Target/ARM/ARMInstrMVE.td
1857

Oof. I was worried you were going to say something like that. Some of these patterns do not fit well into 80 lines. I'll see what I can do.

SjoerdMeijer added inline comments.Jan 26 2021, 9:42 AM
llvm/lib/Target/ARM/ARMInstrMVE.td
1857

Well, do we actually have a coding style for tablegen?
Perhaps this is clearer than breaking it up and there's enough prior art, so perhaps ignore this.

This revision was automatically updated to reflect the committed changes.