[Mlir-commits] [mlir] [mlir][ArmSVE] Implement `ConvertToLLVMPatternInterface` (PR #236760)
Federico Bruzzone
llvmlistbot at llvm.org
Thu Oct 29 12:18:30 PDT 2026
================
@@ -263,3 +273,28 @@ void mlir::configureArmSVELegalizeForExportTarget(
SdotOp>();
// clang-format on
}
+
+namespace {
+/// Implement the interface to convert ArmSVE to LLVM.
+struct ArmSVEToLLVMDialectInterface : ConvertToLLVMPatternInterface {
+ explicit ArmSVEToLLVMDialectInterface(Dialect *dialect)
+ : ConvertToLLVMPatternInterface(dialect) {}
+
+ void loadDependentDialects(MLIRContext *context) const final {
+ context->loadDialect<LLVM::LLVMDialect>();
+ }
+
+ void populateConvertToLLVMConversionPatterns(
+ ConversionTarget &target, LLVMTypeConverter &typeConverter,
+ RewritePatternSet &patterns) const final {
+ configureArmSVELegalizeForExportTarget(target);
+ populateArmSVELegalizeForLLVMExportPatterns(typeConverter, patterns);
+ }
+};
+} // namespace
----------------
FedericoBruzzone wrote:
This also adds the `vector.create_mask` lowering, so it is active whenever `arm_sve` is loaded in the context, even without `add-lowering=arm_sve`. Am I missing something here? 🤔
https://github.com/llvm/llvm-project/pull/236760
More information about the Mlir-commits
mailing list