This is an archive of the discontinued LLVM Phabricator instance.

[mlir][llvm] Fix bug in the LLVM IR constant import.
ClosedPublic

Authored by gysit on Dec 13 2022, 12:47 AM.

Details

Summary

The recently introduced iterative constant import
(https://reviews.llvm.org/D137559) fails for programs that
subsequently import constant expressions with duplicate
subexpressions. The reason is a broken duplicate check
in getConstantsToConvert. The revision fixes the bug and
adds a test case that imports two constant expressions
with duplicates.

Diff Detail

Event Timeline

gysit created this revision.Dec 13 2022, 12:47 AM
Herald added a project: Restricted Project. · View Herald Transcript
gysit requested review of this revision.Dec 13 2022, 12:47 AM
ftynse accepted this revision.Dec 13 2022, 10:00 PM
This revision is now accepted and ready to land.Dec 13 2022, 10:00 PM
This revision was automatically updated to reflect the committed changes.