Page MenuHomePhabricator

[RISCV][Clang] Add more RVV Floating-Point intrinsic functions.
ClosedPublic

Authored by khchen on Wed, Mar 31, 9:45 AM.

Details

Summary

Support below instructions.

  1. Vector Widening Floating-Point Add/Subtract Instructions
  2. Vector Widening Floating-Point Multiply
  3. Vector Single-Width Floating-Point Fused Multiply-Add Instructions
  4. Vector Widening Floating-Point Fused Multiply-Add Instructions
  5. Vector Floating-Point Compare Instructions

Diff Detail

Event Timeline

khchen created this revision.Wed, Mar 31, 9:45 AM
khchen requested review of this revision.Wed, Mar 31, 9:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptWed, Mar 31, 9:45 AM
khchen updated this revision to Diff 334659.Thu, Apr 1, 5:40 AM

rebase and refine multiclass.

HsiangKai added inline comments.Tue, Apr 6, 12:21 AM
clang/include/clang/Basic/riscv_vector.td
300

why is there not -3 in Log2LMUL?

824–828

ditto.

khchen marked 2 inline comments as done.Tue, Apr 6, 6:43 AM
khchen added inline comments.
clang/include/clang/Basic/riscv_vector.td
300

Because there is no vector floating type with mf8.
The minimum faction LMUL for floating is mf2 and half float is mf4.
In fact, we can give all LMUL combinations because the clang generator will make sure the type is legal.

craig.topper added inline comments.Tue, Apr 6, 10:15 AM
clang/include/clang/Basic/riscv_vector.td
300

Since we're not generating "h" here it should either be all LMULs or remove -2 as well.

831–838

Can we line up the colons here so that RVVFloatingTerBuiltinSet is in the same place in every line?

clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vfwadd.c
55

Are we going to fix the inconsistency with vfwadd_vf?

khchen updated this revision to Diff 335846.Wed, Apr 7, 9:37 AM
khchen marked 4 inline comments as done.

address Craig's comments.

This revision is now accepted and ready to land.Wed, Apr 7, 10:06 AM
khchen updated this revision to Diff 336117.Thu, Apr 8, 8:17 AM

rebase.

I don't know why let cannot overide field when we change instantiate single multiclasses to inheritance.

This revision was landed with ongoing or failed builds.Sun, Apr 11, 7:30 PM
This revision was automatically updated to reflect the committed changes.