This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add support for matching .vx and .vi forms of binary instructions for fixed vectors.
ClosedPublic

Authored by craig.topper on Feb 9 2021, 12:33 PM.

Details

Summary

Unlike scalable vectors, I'm only using a ComplexPattern for
the immediate itself. The vmv_v_x is matched explicitly. We igore
the VL argument when matching a binary operator, but we do check
it when matching splat directly.

I left out tests for vXi64 as they fail on rv32 right now.

Diff Detail

Event Timeline

craig.topper created this revision.Feb 9 2021, 12:33 PM
craig.topper requested review of this revision.Feb 9 2021, 12:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 9 2021, 12:33 PM
Herald added a subscriber: MaskRay. · View Herald Transcript

Remove unused AVL operand from new tablegen classes.

craig.topper edited the summary of this revision. (Show Details)Feb 9 2021, 2:58 PM

clang-format:

frasercrmck added inline comments.Feb 10 2021, 2:27 AM
llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
4060

Minor typo: RISCInstrVInstrINfoVVL -> RISCVInstrInfoVVL

Fix capitalization in comment.

Could you perhaps explain why the splats (at least as non-roots) are matched like this and not with the existing complex patterns extended to also check VMV_V_X?

llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
4060

I think this has slipped back in after the rebase? RISCInstrVInstrINfoVVLPatterns.td should be RISCVInstrInfoVVLPatterns.td

Reuse the existing ComplexPatterns for the non-root case. The root case doesn't work because we need to match VL still.

Remove SplatIntOp.

frasercrmck accepted this revision.Feb 12 2021, 1:21 AM

Cheers, LGTM.

This revision is now accepted and ready to land.Feb 12 2021, 1:21 AM
This revision was landed with ongoing or failed builds.Feb 12 2021, 9:18 AM
This revision was automatically updated to reflect the committed changes.