[clang] [CIR] Upstream Cast kinds for ComplexType (PR #149717)

Henrich Lauko via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 21 09:50:49 PDT 2025


================
@@ -114,19 +92,42 @@ void LoweringPreparePass::lowerCastOp(cir::CastOp op) {
     break;
 
   case cir::CastKind::float_complex_to_real:
-  case cir::CastKind::int_complex_to_real:
-  case cir::CastKind::float_complex_to_bool:
+  case cir::CastKind::int_complex_to_real: {
+    loweredValue = lowerComplexToScalarCast(getContext(), op, op.getKind());
----------------
xlauko wrote:

This looks fishy, why is it `op.getKind()` here?

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


More information about the cfe-commits mailing list