Files
clang-p2996/mlir/test/Target/LLVMIR/vscale.mlir
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
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
}