[Mlir-commits] [mlir] [mlir][vector][nfc] Update vector-to-llvm.mlir (PR #118112)
Hugo Trachino
llvmlistbot at llvm.org
Thu Dec 5 07:56:15 PST 2024
================
@@ -3696,42 +3844,46 @@ func.func @vector_deinterleave_2d_scalable(%a: vector<2x[8]xf32>) -> (vector<2x[
// CHECK: %[[c2:.*]] = llvm.mlir.constant(2 : i64) : i64
// CHECK: %[[insert2:.*]] = llvm.insertelement %[[a]], %[[insert1]][%[[c2]] : i64] : vector<3xf32>
// CHECK: return %[[insert2]]
-func.func @vector_from_elements_1d(%a: f32, %b: f32) -> vector<3xf32> {
+func.func @from_elements_1d(%a: f32, %b: f32) -> vector<3xf32> {
%0 = vector.from_elements %a, %b, %a : vector<3xf32>
return %0 : vector<3xf32>
}
// -----
-// CHECK-LABEL: func.func @vector_from_elements_0d(
+// CHECK-LABEL: func.func @from_elements_0d(
// CHECK-SAME: %[[a:.*]]: f32)
// CHECK: %[[undef:.*]] = llvm.mlir.undef : vector<1xf32>
// CHECK: %[[c0:.*]] = llvm.mlir.constant(0 : i64) : i64
// CHECK: %[[insert0:.*]] = llvm.insertelement %[[a]], %[[undef]][%[[c0]] : i64] : vector<1xf32>
// CHECK: %[[cast:.*]] = builtin.unrealized_conversion_cast %[[insert0]] : vector<1xf32> to vector<f32>
// CHECK: return %[[cast]]
-func.func @vector_from_elements_0d(%a: f32) -> vector<f32> {
+func.func @from_elements_0d(%a: f32) -> vector<f32> {
%0 = vector.from_elements %a : vector<f32>
return %0 : vector<f32>
}
// -----
-// CHECK-LABEL: @vector_step_scalable
+//===----------------------------------------------------------------------===//
+// vector.step
+//===----------------------------------------------------------------------===//
+
+// CHECK-LABEL: @step_scalable
// CHECK: %[[STEPVECTOR:.*]] = llvm.intr.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_scalable() -> vector<[4]xindex> {
+func.func @step_scalable() -> vector<[4]xindex> {
----------------
nujaa wrote:
NIT or part of a future consistency patch: The scalable case is usually after the standard one.
https://github.com/llvm/llvm-project/pull/118112
More information about the Mlir-commits
mailing list