This is an archive of the discontinued LLVM Phabricator instance.

[LV] PreferPredicateOverEpilog respecting predicate loop hint
ClosedPublic

Authored by SjoerdMeijer on Nov 12 2019, 7:31 AM.

Details

Summary

The vectoriser queries TTI->preferPredicateOverEpilogue to determine whether tail-folding is preferred for a loop, but it was not respecting loop hint 'predicate' that can disable this, which has now been added. This showed that we were incorrectly initialising loop hint 'vectorize.predicate.enable' with 0 (i.e. FK_Disabled) but this should have been FK_Undefined, which has been fixed.

Diff Detail

Event Timeline

SjoerdMeijer created this revision.Nov 12 2019, 7:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 12 2019, 7:31 AM
simoll added a subscriber: simoll.Nov 12 2019, 7:37 AM
samparker accepted this revision.Nov 14 2019, 2:45 AM

Looks sensbile.

This revision is now accepted and ready to land.Nov 14 2019, 2:45 AM

Thanks for reviewing!
I now see that I would have to follow up on this to in addition also respect the option when that disables predication. But I will do that separately, one functional change at a time, since this essentially is a bug fix for the incorrectly initialised loop hint.

This revision was automatically updated to reflect the committed changes.