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
217 B
MLIR
8 lines
217 B
MLIR
// RUN: mlir-translate -mlir-to-llvmir %s | FileCheck %s
|
|
|
|
llvm.func @vscale_func() vscale_range(2,8) {
|
|
// CHECK-LABEL: define void @vscale_func
|
|
// CHECK: attributes #{{.*}} = { vscale_range(2,8) }
|
|
llvm.return
|
|
}
|