This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Support fixed-length vector i2fp/fp2i conversions
ClosedPublic

Authored by frasercrmck on Feb 24 2021, 3:07 AM.

Details

Summary

This patch extends the support for scalable-vector int->fp and fp->int
conversions by additionally handling fixed-length vectors.

The existing scalable-vector lowering re-expresses widening/narrowing by
x4+ conversions as standard nodes. The fixed-length vector support slots
in at "the end" of this process by lowering the now equally-sized and
widening/narrowing by x2 nodes to our custom VL versions.

Diff Detail

Event Timeline

frasercrmck created this revision.Feb 24 2021, 3:07 AM
frasercrmck requested review of this revision.Feb 24 2021, 3:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 24 2021, 3:07 AM
frasercrmck added inline comments.Feb 24 2021, 3:10 AM
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-i2fp.ll
280

The codegen is surprisingly poor here. I'll try and see what's going on.

frasercrmck added inline comments.Feb 24 2021, 3:26 AM
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-i2fp.ll
280

Ah yes it's concat_vectors expansion through the stack, as we see in D97202.

craig.topper accepted this revision.Feb 24 2021, 1:25 PM

LGTM other than that one comment.

llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
867

Is this suppposed to be 14.19?

This revision is now accepted and ready to land.Feb 24 2021, 1:25 PM
  • rebase & regenerate tests
  • rebase and fix comment
frasercrmck marked an inline comment as done.Feb 25 2021, 4:24 AM
frasercrmck added inline comments.
llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
867

Yep, thanks for catching that

This revision was automatically updated to reflect the committed changes.
frasercrmck marked an inline comment as done.