[PATCH] D139873: [RISCV] Add support for the vscale_range attribute.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 12 12:02:42 PST 2022


craig.topper created this revision.
craig.topper added reviewers: reames, frasercrmck, rogfer01, kito-cheng, arcbbb.
Herald added subscribers: sunshaoce, VincentWu, StephenFan, vkmr, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzheng, jrtc27, shiva0217, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, arichardson.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

This is based on @frasercrmck's D107290 <https://reviews.llvm.org/D107290>. I had to make modifications
to support -riscv-v-vector-bits-min=-1. At least some of the clang
portion of D107290 <https://reviews.llvm.org/D107290> has already been committed.

This uses vscale_range for min/max vector width unless the command
line overrides are used.

As a follow up, I plan to add a max or exact VLEN option to clang
to control the vscale_range. This will eliminate many of the reasons
for users to use the overrides through the -mllvm interface.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D139873

Files:
  llvm/lib/Target/RISCV/RISCVSubtarget.cpp
  llvm/lib/Target/RISCV/RISCVSubtarget.h
  llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vscale-range.ll
  llvm/test/CodeGen/RISCV/rvv/vector-splice.ll
  llvm/test/Transforms/LoopVectorize/RISCV/short-trip-count.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139873.482219.patch
Type: text/x-patch
Size: 16662 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221212/a0fc672c/attachment.bin>


More information about the llvm-commits mailing list