[all-commits] [llvm/llvm-project] 18f3a1: [RISCV] Validate the SEW and LMUL operands to __bu...

Craig Topper via All-commits all-commits at lists.llvm.org
Mon May 10 12:11:56 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 18f3a14e1328c813fa5dbacc9bb931d22f0669cd
      https://github.com/llvm/llvm-project/commit/18f3a14e1328c813fa5dbacc9bb931d22f0669cd
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-05-10 (Mon, 10 May 2021)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Sema/SemaChecking.cpp
    A clang/test/CodeGen/RISCV/rvv_errors.c

  Log Message:
  -----------
  [RISCV] Validate the SEW and LMUL operands to __builtin_rvv_vsetvli(max)

These are required to be constants, this patch makes sure they
are in the accepted range of values.

These are usually created by wrappers in the riscv_vector.h header
which should always be correct. This patch protects against a user
using the builtin directly.

Reviewed By: khchen

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




More information about the All-commits mailing list