[all-commits] [llvm/llvm-project] 8c7cfa: [mlir] fix LLVM IR translation of vector<... x index>
ftynse via All-commits
all-commits at lists.llvm.org
Tue Feb 14 02:43:11 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8c7cfa357280dd93d33b10bbba0fe33797e27d63
https://github.com/llvm/llvm-project/commit/8c7cfa357280dd93d33b10bbba0fe33797e27d63
Author: Alex Zinenko <zinenko at google.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
M mlir/test/Target/LLVMIR/llvmir.mlir
Log Message:
-----------
[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
More information about the All-commits
mailing list