================ @@ -971,6 +971,52 @@ def SwitchOp : CIR_Op<"switch", }]; } +//===----------------------------------------------------------------------===// +// SwitchFlatOp +//===----------------------------------------------------------------------===// + +def SwitchFlatOp : CIR_Op<"switch.flat", [AttrSizedOperandSegments, + Terminator]> { + + let description = [{ + The `cir.switch.flat` operation is a region-less and simplified + version of the `cir.switch`. + It's representation is closer to LLVM IR dialect + than the C/C++ language feature. + }]; + + let arguments = (ins + CIR_IntType:$condition, + Variadic<AnyType>:$defaultOperands, + VariadicOfVariadic<AnyType, "case_operand_segments">:$caseOperands, + ArrayAttr:$case_values, ---------------- andykaylor wrote:
There's an inconsistency between `case_values` here and on line 1004, and `caseValues` on line 1014. I see that the LLVM dialect's `LLVM_SwitchOp` has the same inconsistency, but I don't see any other place that it's referenced directly. https://github.com/llvm/llvm-project/pull/139154 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits