This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Fix bitwidth of memref-to-llvm constant.
ClosedPublic

Authored by gysit on Oct 12 2022, 6:46 AM.

Details

Summary

One constant generated in MemRefToLLVM had a hardcoded bitwidth of
64 bits. The fix uses the typeConverter to create a constant that
matches the bitwidth of the provided by the data layout. The issue was
detected in an attempt to add a verifier to the LLVM ICmp operation that
checks that the types of the compared arguments match.

Diff Detail

Event Timeline

gysit created this revision.Oct 12 2022, 6:46 AM
Herald added a project: Restricted Project. · View Herald Transcript
gysit requested review of this revision.Oct 12 2022, 6:46 AM
ftynse accepted this revision.Oct 12 2022, 6:54 AM
This revision is now accepted and ready to land.Oct 12 2022, 6:54 AM
This revision was automatically updated to reflect the committed changes.