This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Fix build error due to -Wsign-compare after revision D140871
ClosedPublic

Authored by DamonFool on Jan 5 2023, 6:41 PM.

Details

Summary

This patch fixes build failure due to -Wsign-compare in sparse2SparseRewrite(...) after https://reviews.llvm.org/D140871.

llvm-project/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp:842:32: error: comparison of integers of different signs: 'uint64_t' (aka 'unsigned long') and 'int64_t' (aka 'long') [-Werror,-Wsign-compare]
        for (uint64_t i = 0; i < rank; i++) {
                             ~ ^ ~~~~
1 error generated.

Diff Detail

Event Timeline

DamonFool created this revision.Jan 5 2023, 6:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 5 2023, 6:41 PM
DamonFool requested review of this revision.Jan 5 2023, 6:41 PM
MaskRay accepted this revision.Jan 5 2023, 6:49 PM
This revision is now accepted and ready to land.Jan 5 2023, 6:49 PM

Thanks @MaskRay for your review.

I don’t have commit access, can you land this patch for me?
Please use “Jie Fu jiefu@tencent.com” to commit the change.
Thanks.

Thanks @jpienaar for your help.