[Mlir-commits] [mlir] [mlir][spirv][vector] Support converting vector.from_elements to SPIR-V (PR #118540)
Jakub Kuderski
llvmlistbot at llvm.org
Tue Dec 3 14:21:51 PST 2024
================
@@ -220,6 +220,34 @@ struct VectorFmaOpConvert final : public OpConversionPattern<vector::FMAOp> {
}
};
+struct VectorFromElementsOpConvert final
+ : public OpConversionPattern<vector::FromElementsOp> {
+ using OpConversionPattern::OpConversionPattern;
+
+ LogicalResult
+ matchAndRewrite(vector::FromElementsOp op, OpAdaptor adaptor,
+ ConversionPatternRewriter &rewriter) const override {
+ Type resultType = getTypeConverter()->convertType(op.getType());
+ auto elements = op.getElements();
----------------
kuhar wrote:
Use the full type instead of `auto` when the type is not obvious based on the RHS only.
https://github.com/llvm/llvm-project/pull/118540
More information about the Mlir-commits
mailing list