================ @@ -1246,6 +1246,59 @@ def SelectOp : CIR_Op<"select", [Pure, }]; } +//===----------------------------------------------------------------------===// +// TernaryOp +//===----------------------------------------------------------------------===// + +def TernaryOp : CIR_Op<"ternary", + [DeclareOpInterfaceMethods<RegionBranchOpInterface>, + RecursivelySpeculatable, AutomaticAllocationScope, NoRegionArguments]> { + let summary = "The `cond ? a : b` C/C++ ternary operation"; ---------------- andykaylor wrote:
Oh. I didn't realize we ran CIR simplification based on the opt level. I guess it makes sense in a way, but I'm not thrilled with the idea that this is happening in the front end. This relates to the suggestion I made elsewhere that maybe we should be moving the lowering and transforms out of the clang component. https://github.com/llvm/llvm-project/pull/137184 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits