[Mlir-commits] [mlir] [mlir][Transforms] Dialect Conversion Driver without Rollback (PR #151865)

Matthias Springer llvmlistbot at llvm.org
Sun Aug 10 02:17:46 PDT 2025


================
@@ -23,9 +24,9 @@ func.func @complex_constant() -> complex<f64> {
 
 // CHECK-LABEL: func @complex_extract
 // CHECK-SAME:    (%[[CPLX:.*]]: complex<f32>)
-// CHECK-NEXT:    %[[CAST0:.*]] = builtin.unrealized_conversion_cast %[[CPLX]] : complex<f32> to !llvm.struct<(f32, f32)>
-// CHECK-NEXT:    %[[REAL:.*]] = llvm.extractvalue %[[CAST0]][0] : !llvm.struct<(f32, f32)>
-// CHECK-NEXT:    %[[IMAG:.*]] = llvm.extractvalue %[[CAST0]][1] : !llvm.struct<(f32, f32)>
+// CHECK:    builtin.unrealized_conversion_cast %[[CPLX]] : complex<f32> to !llvm.struct<(f32, f32)>
----------------
matthias-springer wrote:

The new driver inserts two `unrealized_conversion_casts` here. The old driver inserts only one. With this change, the same CHECK can be used for both the old and the new driver.

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


More information about the Mlir-commits mailing list