This is an archive of the discontinued LLVM Phabricator instance.

[flang]Add test for 2D loop versioning test
ClosedPublic

Authored by Leporacanthicus on Apr 26 2023, 9:30 AM.

Details

Summary

Another test based on review comments added late in the review.

This one confirms that the multiplication and addition of the outer
index to the inner index and thus form the 2D index.

Diff Detail

Event Timeline

Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 26 2023, 9:30 AM
Herald added a subscriber: sunshaoce. · View Herald Transcript
Leporacanthicus requested review of this revision.Apr 26 2023, 9:30 AM
tblah added inline comments.Apr 26 2023, 9:41 AM
flang/test/Transforms/loop-versioning.fir
363

Why is the array now one-dimensional?

388–391

nit: extra whitespace

flang/test/Transforms/loop-versioning.fir
363

It's the only way to make an array that we can access as a linear lump of memory, which is kind of the point of the pass.

It was discussed in the original review (or at least I thought it was, may have been discussed in Slack or something).

Leporacanthicus marked an inline comment as done.

Remove empty lines

tblah accepted this revision.May 4 2023, 2:57 AM

LGTM

This revision is now accepted and ready to land.May 4 2023, 2:57 AM
This revision was automatically updated to reflect the committed changes.