This is an archive of the discontinued LLVM Phabricator instance.

[LV] Clamp the Unroll Factor to at least 1
AbandonedPublic

Authored by simoll on Apr 22 2020, 5:50 AM.

Details

Summary

LV requires the unroll factor (UF) to be >= 1. This patch adds an explicit assertion for this and fixes a case in the cost model where the UF was set to zero. This was exposed by an out-of-tree TTI implementation that reported zero scores for candidate vectorization factors.

Diff Detail

Event Timeline

simoll created this revision.Apr 22 2020, 5:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2020, 5:50 AM
fhahn added a comment.May 15 2020, 7:46 AM

Is the problem TTI.getMaxInterleaveFactor() returning 0? If that's the case, I think it would be better to make sure TTI.getMaxInterleaveFactor() returns at least 1.

fhahn requested changes to this revision.Jun 2 2020, 1:10 PM

Marking as changes requested to clear up review queue, as this has a pending comment.

This revision now requires changes to proceed.Jun 2 2020, 1:10 PM
simoll abandoned this revision.Jun 9 2021, 2:51 AM