[RISCV] Add support for the vscale_range attribute.
authorCraig Topper <craig.topper@sifive.com>
Fri, 6 Jan 2023 16:20:37 +0000 (08:20 -0800)
committerCraig Topper <craig.topper@sifive.com>
Fri, 6 Jan 2023 16:20:37 +0000 (08:20 -0800)
commite5a71a41d8e043a502d88b42a69f5731faa17849
tree1a8f5679be8a9f7d47a6d2dffa303f68ab1742cf
parentf41abcda5ee0cf9d6a99bae5db08c60cbbafa760
[RISCV] Add support for the vscale_range attribute.

This is based on @frasercrmck's D107290. At least some of the clang
portion of 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.

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D139873
llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vscale-range.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rvv/vector-splice.ll
llvm/test/Transforms/LoopVectorize/RISCV/short-trip-count.ll