This is an archive of the discontinued LLVM Phabricator instance.

Update LSR's logic that identifies a post-increment SCEV value.
ClosedPublic

Authored by sgundapa on Feb 24 2020, 2:17 PM.

Details

Summary

One of the checks has been removed as it seem invalid.
The LoopStep size is always almost a 32-bit.

Diff Detail

Event Timeline

sgundapa created this revision.Feb 24 2020, 2:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 24 2020, 2:17 PM
bcahoon added inline comments.Feb 27 2020, 8:48 AM
llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
3535

I don't remember why I added that code. It doesn't make any sense to me, so I think it's good to remove.

dmgreen accepted this revision.Mar 2 2020, 9:06 AM

Hello. I have been looking at post-inc in LSR a little recently, trying to make it more reliable in some of the MVE kernels we have been seeing. I'm not sure the types it uses are always correct (those passed to isIndexedLoadLegal), and there are some masked load/store changes that might be useful. I haven't really come up with anything I'm super happy with though.

This change on it's own sounds sensible to me, and fixes one of the testcase I was looking at. I will add that test once this is in. LGTM.

This revision is now accepted and ready to land.Mar 2 2020, 9:06 AM

Thanks for reviewing this patch. I have merged the change.

The post-inc support to LSR was added long time back and it is possible some of the assumptions might have changed for a variety of reasons (Eg: Change in API)

This revision was automatically updated to reflect the committed changes.