[mlir] fix LLVM IR translation of vector<... x index>
When the translation was written, `vector<... x index>` was not allowed at all. After it was added later, the translation was never adapted. It kept working in the most common case of index-typed attributes using 64-bit storage and being converted to 64-bit integers in LLVM IR, but not in the other cases that require truncation or extension, producing wrong results when using the raw data storage of the dense attrbute to construct the LLVM IR constant. When the storage size doesn't match, fall back to the per-element constant construction, which is slower but handles bitwidth differences correctly. Fixes #60614. Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D143993
Loading
Please sign in to comment