[Mlir-commits] [mlir] [mlir][SCF] Add scf.index_switch support for populateSCFStructuralTypeConversionsAndLegality (PR #160344)
Ivan Butygin
llvmlistbot at llvm.org
Tue Sep 23 10:18:57 PDT 2025
================
@@ -185,6 +185,31 @@ class ConvertWhileOpTypes
};
} // namespace
+namespace {
+class ConvertIndexSwitchOpTypes
+ : public Structural1ToNConversionPattern<IndexSwitchOp,
+ ConvertIndexSwitchOpTypes> {
+public:
+ using Structural1ToNConversionPattern::Structural1ToNConversionPattern;
+
+ std::optional<IndexSwitchOp>
+ convertSourceOp(IndexSwitchOp op, OneToNOpAdaptor adaptor,
+ ConversionPatternRewriter &rewriter,
+ TypeRange dstTypes) const {
+ auto newOp = rewriter.create<IndexSwitchOp>(
----------------
Hardcode84 wrote:
Please use new style op builder `IndexSwitchOp::create`
https://github.com/llvm/llvm-project/pull/160344
More information about the Mlir-commits
mailing list