[all-commits] [llvm/llvm-project] 4710e7: [RISCV] Implement RISCVTTIImpl::getMaxVScale corre...

Philip Reames via All-commits all-commits at lists.llvm.org
Fri Jun 24 16:52:17 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4710e789741fd69a0044f96138e7e874a4e1f74d
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2022-06-24 (Fri, 24 Jun 2022)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp

  Log Message:
  [RISCV] Implement RISCVTTIImpl::getMaxVScale correctly

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.

Differential Revision: https://reviews.llvm.org/D128538

More information about the All-commits mailing list