[all-commits] [llvm/llvm-project] b833bc: [mlir][ArmSVE] Add convert_to/from_svbool ops (#68...
Benjamin Maxwell via All-commits
all-commits at lists.llvm.org
Thu Oct 12 07:43:56 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b833bcb55947822fb82f32bf35479bb25d5b7ddf
https://github.com/llvm/llvm-project/commit/b833bcb55947822fb82f32bf35479bb25d5b7ddf
Author: Benjamin Maxwell <benjamin.maxwell at arm.com>
Date: 2023-10-12 (Thu, 12 Oct 2023)
Changed paths:
M mlir/include/mlir/Dialect/ArmSVE/IR/ArmSVE.td
M mlir/include/mlir/IR/CommonTypeConstraints.td
M mlir/lib/Dialect/ArmSVE/IR/ArmSVEDialect.cpp
M mlir/lib/Dialect/ArmSVE/IR/CMakeLists.txt
M mlir/lib/Dialect/ArmSVE/Transforms/CMakeLists.txt
M mlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp
A mlir/test/Dialect/ArmSVE/invalid.mlir
M mlir/test/Dialect/ArmSVE/legalize-for-llvm.mlir
M mlir/test/Dialect/ArmSVE/roundtrip.mlir
Log Message:
-----------
[mlir][ArmSVE] Add convert_to/from_svbool ops (#68586)
This adds slightly higher-level ops for converting masks between svbool
and SVE predicate types. The main reason to use these over the
intrinsics is these ops support vectors of masks (via unrolling).
E.g.
```
// Convert a svbool mask to a mask of SVE predicates:
%svbool = vector.load %memref[%c0, %c0]
: memref<2x?xi1>, vector<2x[16]xi1>
%mask = arm_sve.convert_from_svbool %svbool : vector<2x[8]xi1>
// => Results in vector<2x[8]xi1>
```
Or:
```
// Convert a mask of SVE predicates to a svbool mask:
%mask = vector.create_mask %c2, %dim_size : vector<2x[2]xi1>
%svbool = arm_sve.convert_to_svbool %mask : vector<2x[2]xi1>
// => Results in vector<2x[16]xi1>
```
Depends on #68418
More information about the All-commits
mailing list