This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Define vector widening type-convert intrinsic.
ClosedPublic

Authored by monkchiang on Dec 28 2020, 2:22 AM.

Details

Summary

Define intrinsics:

  1. vfwcvt.xu.f.v/vfwcvt.x.f.v
  2. vfwcvt.rtz.xu.f.v/vfwcvt.rtz.x.f.v
  3. vfwcvt.f.xu.v/vfwcvt.f.x.v
  4. vfwcvt.f.f.v

We work with @rogfer01 from BSC to come out this patch.

Authored-by: Roger Ferrer Ibanez <rofirrim@gmail.com>
Co-Authored-by: Monk Chiang <monk.chiang@sifive.com>

Diff Detail

Event Timeline

monkchiang created this revision.Dec 28 2020, 2:22 AM
monkchiang requested review of this revision.Dec 28 2020, 2:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 28 2020, 2:22 AM
Herald added a subscriber: MaskRay. · View Herald Transcript

Do these instructions need earlyclobber?

llvm/include/llvm/IR/IntrinsicsRISCV.td
400

The destination vector type isn't the same as the first source vector so this comment seems wrong

407

Same here

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

Why can't we just list the float types as the second argument here instead of needing use GetFloatVTypeInfo?

address @craig.topper 's comments, and rebase the patch.
thanks!

craig.topper added inline comments.Dec 29 2020, 10:56 AM
llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
187

This is unneeded now.

1283

Why are we removing this blank line?

llvm/test/CodeGen/RISCV/rvv/vfwcvt-f-f-rv32.ll
2

Float to double is missing from rv32.

llvm/test/CodeGen/RISCV/rvv/vfwcvt-f-x-rv32.ll
2

i32 to double is missing

llvm/test/CodeGen/RISCV/rvv/vfwcvt-f-xu-rv32.ll
2

i32 to double is missing

Remove unneeded class, and Add several missing test cases for RV32.
All of mask test cases follow-up D93878.

Remove i64 to float in RV32 test case for fwcvt.xu.f.v/fwcvt.x.f.v/fwcvt.rtz.xu.f.v/fwcvt.rtz.x.f.v intrinsic.

This revision is now accepted and ready to land.Dec 29 2020, 11:50 PM
craig.topper requested changes to this revision.Dec 30 2020, 12:27 AM

I don't think my earlyclobber question from earlier was addressed?

This revision now requires changes to proceed.Dec 30 2020, 12:27 AM
monkchiang updated this revision to Diff 314100.EditedDec 30 2020, 4:52 AM
  1. Add earlyclobber constraint
  2. vfwcvt.f.xu and vfwcvt.f.x support i8 to float16 conversion
  3. Add new test cases for vfwcvt.f.xu and vfwcvt.f.x

I don't think my earlyclobber question from earlier was addressed?

Sorry, I didn't see this comment until you noticed.

This revision is now accepted and ready to land.Dec 30 2020, 10:03 AM
This revision was landed with ongoing or failed builds.Dec 30 2020, 7:57 PM
This revision was automatically updated to reflect the committed changes.