[Mlir-commits] [mlir] [mlir][SPIR-V] Add SPIRVToLLVM conversion for VectorTimesScalar (PR #206949)
Igor Wodiany
llvmlistbot at llvm.org
Tue Jul 28 06:51:19 PDT 2026
================
@@ -234,6 +234,21 @@ spirv.func @srem_vector(%arg0: vector<4xi32>, %arg1: vector<4xi32>) "None" {
spirv.Return
}
+//===----------------------------------------------------------------------===//
+// spirv.VectorTimesScalar
+//===----------------------------------------------------------------------===//
+
+// CHECK-LABEL: @vector_times_scalar
+spirv.func @vector_times_scalar(%vector: vector<4xf32>, %scalar: f32) "None" {
+ // CHECK: %[[UNDEF:.*]] = llvm.mlir.poison : vector<4xf32>
+ // CHECK: llvm.insertelement %{{.*}}, %[[UNDEF]]
+ // CHECK-COUNT-2: llvm.insertelement
+ // CHECK: %[[BCAST:.*]] = llvm.insertelement
----------------
IgWod wrote:
Can you please spell out the whole thing? I'm not very familiar with the LLVM dialect and it was hard to follow until I looked up `llvm.insertelement`.
https://github.com/llvm/llvm-project/pull/206949
More information about the Mlir-commits
mailing list