This is an archive of the discontinued LLVM Phabricator instance.

[mlir][MemRefToLLVM] Fix the lowering of extract_strided_metadata
ClosedPublic

Authored by qcolombet on Nov 3 2022, 3:10 PM.

Details

Summary

The first result of the extract_strided_metadata operation is a MemRef, not a naked pointer.
This patch fixes the lowering of this operation in MemRefToLLVM so that we properly materialize the full MemRef structure and not just the base naked pointer.

Diff Detail

Event Timeline

qcolombet created this revision.Nov 3 2022, 3:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 3 2022, 3:10 PM
qcolombet requested review of this revision.Nov 3 2022, 3:10 PM
ftynse accepted this revision.Nov 3 2022, 5:18 PM
This revision is now accepted and ready to land.Nov 3 2022, 5:18 PM
qcolombet updated this revision to Diff 473303.Nov 4 2022, 11:48 AM
  • The order of evaluation of the arguments of a function is platform dependent, as a result the code that extracts the base and aligned pointers from the source memref would happen in different order on different platforms, hence the failure on debian. To fix that put the basePtr and alignedPtr in temporary variables before making the call.