You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[rebase] workaround LLVM dialect array constant issue with dense attributes
StringLitOp use to be translated to things like:
llvm.func @character_literal2() -> !llvm.array<2 x i16> {
%0 = llvm.mlir.constant(dense<[234, 456]> : vector<2xi16>) : !llvm.array<2 x i16>
llvm.return %0 : !llvm.array<2 x i16>
}
Now yields error:
Function return type does not match operand type of return inst!
ret <2 x i16> <i16 234, i16 456>, !dbg !7
[2 x i16]error: could not emit LLVM-IR
Yet, using dense attr looks the right things to do given mlir tests like
https://github.com/llvm/llvm-project/blob/e356027016c6365b3d8924f54c33e2c63d931492/mlir/test/Target/LLVMIR/llvmir.mlir#L31
So there might be an MLIR regression here. In the short-term, use
a chain of insert_value as a fallback.
0 commit comments