Files
clang-p2996/mlir/test/Target/LLVMIR/Import/vscale.ll
Mats Petersson 5bfd5c60bf Add support for MLIR to llvm vscale attribute (#67012)
The vscale_range is used for scalabale vector functionality in Arm
Scalable Vector Extension to select the size of vector operation (and I
thnk RISCV has something similar).

This patch adds the base support for the vscale_range attribute to the
LLVM::FuncOp, and the marshalling for translation to LLVM-IR and import
from LLVM-IR to LLVM dialect.

This attribute is intended to be used at higher level MLIR, specified
either by command-line options to the compiler or using compiler
directives (e.g. pragmas or function attributes in the source code) to
indicate the desired range.
2023-09-25 14:32:18 +01:00

8 lines
203 B
LLVM

; RUN: mlir-translate -import-llvm -split-input-file %s | FileCheck %s
define void @vscale_func() vscale_range(2,8) {
; CHECK: llvm.func @vscale_func()
; CHECK-SAME: vscale_range(2, 8)
ret void
}