Hello!
I have recently encountered an assertion from MLIR’s LLVM-to-llvm-ir
conversion and was wondering if anyone has any insights ?
I do apologize if I am missing something obvious and this is in-fact intentional.
Note that I am using an old MLIR version so this might have been fixed already
(IF it is indeed an issue) but I wasn’t able to find anything on GitHub.
Here is the input:
// input.mlir
llvm.func @main(%arg0: i32) {
llvm.switch %arg0, ^bb1 [
]
^bb1: // pred: ^bb0
llvm.br ^bb2
^bb2: // pred: ^bb1
llvm.return
}
And here is the command I am running:
mlir-translate ./input.mlir --mlir-to-llvmir
I am getting an assertion as follows:
llvm-project/llvm/include/llvm/ADT/Optional.h:196: T& llvm::optional_detail::OptionalStorage<T, true>::getValue() & [with T = mlir::ElementsAttr]: Assertion `hasVal' failed.
Which I believe comes from HERE.
(The link above points to the last commit that looks the same as my version on that particular line … however I believe that a similar assertion will be thrown from HERE in the latest master)
Thank you in advance!
Thanks,
Thanasis.