The lowering creates llvm.insertvalue with the rank value, so it needs to use
index type instead of 64 bit integer type. Otherwise, we get an error:
llvm.insertvalue' op Type mismatch: cannot insert 'i64' into '!llvm.struct<(i32, ptr<i8>)>'
Paths
| Differential D119534
[mlir][MemRef] Fix MemRefCastOpLowering for 32 bit index type. ClosedPublic Authored by akuegel on Feb 11 2022, 2:46 AM.
Details Summary The lowering creates llvm.insertvalue with the rank value, so it needs to use llvm.insertvalue' op Type mismatch: cannot insert 'i64' into '!llvm.struct<(i32, ptr<i8>)>'
Diff Detail
Event TimelineComment Actions FYI, I found this while trying to add a test case for the memref.copy lowering. We run memref-to-llvm.mlir also with the index-bitwidth=32 option. akuegel retitled this revision from [mlir][MemRef] Fix MemRefCastOpLowering for 32 index type. to [mlir][MemRef] Fix MemRefCastOpLowering for 32 bit index type..Feb 11 2022, 3:27 AM This revision is now accepted and ready to land.Feb 11 2022, 3:32 AM Closed by commit rG5b02a480858f: [mlir][MemRef] Fix MemRefCastOpLowering for 32 bit index type. (authored by akuegel). · Explain WhyFeb 11 2022, 3:37 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 407829 mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
mlir/test/Conversion/MemRefToLLVM/convert-dynamic-memref-ops.mlir
mlir/test/Conversion/StandardToLLVM/calling-convention.mlir
|