[Mlir-commits] [mlir] [mlir][vector] Add vector.step operation (PR #96776)

Andrzej WarzyƄski llvmlistbot at llvm.org
Tue Jul 2 10:33:16 PDT 2024


================
@@ -2621,3 +2621,14 @@ func.func @vector_from_elements_0d(%a: f32) -> vector<f32> {
   %0 = vector.from_elements %a : vector<f32>
   return %0 : vector<f32>
 }
+
+// -----
+
+// CHECK-LABEL: @vector_step
+// CHECK: %[[STEPVECTOR:.*]] = llvm.intr.experimental.stepvector : vector<[4]xi64>
+// CHECK: %[[CAST:.*]] = builtin.unrealized_conversion_cast %[[STEPVECTOR]] : vector<[4]xi64> to vector<[4]xindex>
+// CHECK: return %[[CAST]] : vector<[4]xindex>
+func.func @vector_step() -> vector<[4]xindex> {
----------------
banach-space wrote:

```suggestion
func.func @vector_step_scalable() -> vector<[4]xindex> {
```

Let's start properly labeling tests which are intended for scalable vectors only.

https://github.com/llvm/llvm-project/pull/96776


More information about the Mlir-commits mailing list