Open Garic152 opened 6 days ago
Hi @Garic152 ,
for me on the current HEAD
, this doesn't segfault. Instead it throws an exception from here.
CanonicalizerPass (mlir::daphne::CondOp) failed with the following message [ the then/else-values of CondOp must have the same value type ]
| Source file -> "/home/philipportner/daphne/tmp.daphne":1:4
|
1 | a = 1 == 1 ? 1 : 0.0;
| ^~~
Seems like currently matching types are a requirement for the CondOp
, but different types could be something that we should support.
Description
When assigning different datatypes in the ifelse statement, we receive a segfault instead of attempting to promote one of the 2 types or throwing a compilation error.
Steps to Reproduce
Here is a minimal example to reproduce the issue: