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.
8 lines
203 B
LLVM
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
|
|
}
|