[Mlir-commits] [mlir] [mlir][Transforms] Dialect conversion: Simplify handling of dropped arguments (PR #96207)

Johannes Reifferscheid llvmlistbot at llvm.org
Thu Jun 27 00:01:33 PDT 2024


jreiffers wrote:

Hey Matthias,

I'm seeing a new crash with this PR. This no longer lowers successfully to LLVM:

```
module {
  func.func @reproducer() -> !llvm.struct<(f64, f64)> {
    %cst = complex.constant [0.000000e+00, 0.000000e+00] : complex<f64>
    %true = arith.constant true
    %0 = scf.if %true -> complex<f64> {
      scf.yield %cst : complex<f64>
    } else {
      scf.yield %cst : complex<f64>
    }
    %1 = builtin.unrealized_conversion_cast %0 : complex<f64> to !llvm.struct<(f64, f64)>
    return %1 : !llvm.struct<(f64, f64)>
  }
}
```

The error I'm getting is

```
lower-to-llvm.mlir:1 offset :12:10: error: null operand found
    %1 = builtin.unrealized_conversion_cast %0 : complex<f64> to !llvm.struct<(f64, f64)>
         ^
within split at \
lower-to-llvm.mlir:1 offset :12:10: note: see current operation: %3 = "builtin.unrealized_conversion_cast"(<<NULL VALUE>>) : (<<NULL TYPE>>) -> !llvm.struct<(f64, f64)>
```

Could you take a look?

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


More information about the Mlir-commits mailing list