diff --git a/include/vast/Dialect/HighLevel/HighLevelCF.td b/include/vast/Dialect/HighLevel/HighLevelCF.td index e7869921c8..bde62ac1aa 100644 --- a/include/vast/Dialect/HighLevel/HighLevelCF.td +++ b/include/vast/Dialect/HighLevel/HighLevelCF.td @@ -187,6 +187,10 @@ def HighLevel_ChooseExprOp : HighLevel_CondOpBase< "choose_expr" > { let arguments = (ins OptionalAttr< BoolAttr >:$condTrue); + // ChooseExpr can have different types. + // Often used as __builtin_choose_expr(static_cond, 1, (void)0) + let hasRegionVerifier = 0; + let skipDefaultBuilders = 1; let builders = [ OpBuilder<(ins diff --git a/lib/vast/Dialect/HighLevel/HighLevelOps.cpp b/lib/vast/Dialect/HighLevel/HighLevelOps.cpp index 360e7c1849..29249df4f1 100644 --- a/lib/vast/Dialect/HighLevel/HighLevelOps.cpp +++ b/lib/vast/Dialect/HighLevel/HighLevelOps.cpp @@ -621,10 +621,6 @@ namespace vast::hl return verify_condop_yields(getThenRegion(), getElseRegion(), getLoc()); } - logical_result ChooseExprOp::verifyRegions() { - return verify_condop_yields(getThenRegion(), getElseRegion(), getLoc()); - } - logical_result BinaryCondOp::verifyRegions() { return verify_condop_yields(getThenRegion(), getElseRegion(), getLoc()); }