This is an archive of the discontinued LLVM Phabricator instance.

[LoopIdiom] Fix store size SCEV type.
ClosedPublic

Authored by courbet on Oct 8 2021, 4:51 AM.

Details

Summary

We were using the type of the loop back edge count to represent the
store size. This failed for small loop counts (e.g. in the added test,
the loop count was an i2).

Use the index type instead.

Fixes PR52104.

Diff Detail

Event Timeline

courbet created this revision.Oct 8 2021, 4:51 AM
courbet requested review of this revision.Oct 8 2021, 4:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 8 2021, 4:51 AM
nikic accepted this revision.Oct 8 2021, 1:24 PM

LGTM

This revision is now accepted and ready to land.Oct 8 2021, 1:24 PM
This revision was automatically updated to reflect the committed changes.