This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add intrinsics for vslide1up/down, vfslide1up/down instruction
ClosedPublic

Authored by arcbbb on Dec 20 2020, 7:40 PM.

Details

Summary

Define vslide1up, vslide1down, vfslide1up, and vfslide1down intrinsics and lower to V instructions.

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

Authored-by: Roger Ferrer Ibanez <rofirrim@gmail.com>
Co-Authored-by: ShihPo Hung <shihpo.hung@sifive.com>

Diff Detail

Event Timeline

arcbbb created this revision.Dec 20 2020, 7:40 PM
arcbbb requested review of this revision.Dec 20 2020, 7:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 20 2020, 7:40 PM
arcbbb updated this revision to Diff 313101.Dec 21 2020, 6:43 AM

Fixed test failures.

craig.topper added inline comments.Dec 21 2020, 9:57 AM
llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
1754

Doesn't slide1up need an earlyclobber?

llvm/test/CodeGen/RISCV/rvv/vfslide1up-rv32.ll
12

It would be nice if we used the update_llc_test_checks.py script to generate these tests so we could see whether the source and destination register were the same or not.

craig.topper added inline comments.Dec 21 2020, 10:17 AM
llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
1747

Previous predicates closed here. Should these VSLIDE* instructions have a Predicate?

arcbbb updated this revision to Diff 313232.Dec 21 2020, 7:28 PM

Updates:

  1. Fixed missing earlyclobber for VSLIDE1UP pseudos
  2. Added missing Predicate for VSLIDE pseudos
  3. updated tests with update_llc_test_checks.py
craig.topper added inline comments.Dec 21 2020, 8:38 PM
llvm/test/CodeGen/RISCV/rvv/vfslide1up-rv32.ll
15

Is the earlyclobber constraint not working here?

arcbbb marked 3 inline comments as done.Dec 21 2020, 10:20 PM
arcbbb added inline comments.
llvm/test/CodeGen/RISCV/rvv/vfslide1up-rv32.ll
15

my local build is not clean. let my rebuild & update this again.

arcbbb updated this revision to Diff 313245.Dec 21 2020, 10:28 PM

Updates the tests and earlyclobber takes effect.

arcbbb updated this revision to Diff 313248.Dec 21 2020, 10:49 PM

updated again

arcbbb marked an inline comment as done.Dec 21 2020, 10:50 PM
This revision is now accepted and ready to land.Dec 22 2020, 9:46 AM