This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Match vmslt(u).vx intrinsics with a small immediate to vmsle(u).vx.
ClosedPublic

Authored by craig.topper on Jan 5 2021, 1:16 AM.

Details

Summary

There are vmsle(u).vx and vmsle(u).vi instructions, but there is
only vmslt(u).vx and no vmslt(u).vi. vmslt(u).vi can be emulated
for some immediates by decrementing the immediate and using vmsle(u).vi.

To avoid the user needing to know about this, this patch does this
conversion.

The assembler does the same thing for vmslt(u).vi and vmsge(u).vi
pseudoinstructions. There is no vmsge(u).vx intrinsic or
instruction so this patch is limited to vmslt(u).

Diff Detail

Event Timeline

craig.topper created this revision.Jan 5 2021, 1:16 AM
craig.topper requested review of this revision.Jan 5 2021, 1:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 5 2021, 1:16 AM
Herald added a subscriber: MaskRay. · View Herald Transcript
frasercrmck accepted this revision.Jan 5 2021, 6:37 AM

LGTM other than my minor nit.

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

Are these operands meant to be aligned with the one above?

This revision is now accepted and ready to land.Jan 5 2021, 6:37 AM
craig.topper added inline comments.Jan 5 2021, 9:59 AM
llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
3119

Yes. I must have missed fixing it when I copied from above and inserted 'u' into the intrinsic name