[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Thu May 1 15:41:46 PDT 2025


================
@@ -272,6 +272,22 @@ class CIRBaseBuilderTy : public mlir::OpBuilder {
     return createCast(loc, cir::CastKind::bitcast, src, newTy);
   }
 
+  // TODO(cir): the following function was introduced to keep in sync with LLVM
----------------
andykaylor wrote:

This probably made sense when the incubator was in the early stages of development, but I don't think there's much value in staying structurally in sync with classic codegen when the CIR implementation is doing something entirely different. The "eventually" in the comment should be now. However, we should probably leave a bread crumb so anyone upstreaming code that calls this function can easily figure out what we did with it.

https://github.com/llvm/llvm-project/pull/138156


More information about the cfe-commits mailing list