This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Implement RISCVTTIImpl::getMaxVScale correctly
ClosedPublic

Authored by reames on Jun 24 2022, 9:13 AM.

Details

Summary

The comments in the existing code appear to pre-exist the standardization of the +v extension. In particular, the specification *does* provide a bound on the maximum value VLEN can take. From what I can tell, the LMUL comment was simply a misunderstanding of what this API returns.

This API returns the maximum value that vscale can take at runtime. This is used in the vectorizer to bound the largest scalable VF (e.g. LMUL in RISCV terms) which can be used without violating memory dependence.

Diff Detail

Event Timeline

reames created this revision.Jun 24 2022, 9:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 24 2022, 9:14 AM
reames requested review of this revision.Jun 24 2022, 9:14 AM
This revision is now accepted and ready to land.Jun 24 2022, 2:51 PM
This revision was landed with ongoing or failed builds.Jun 24 2022, 4:52 PM
This revision was automatically updated to reflect the committed changes.