[all-commits] [llvm/llvm-project] 235e90: [Clang][RISCV] Guard vector float16 type correctly...

Yueh-Ting (eop) Chen via All-commits all-commits at lists.llvm.org
Mon Feb 13 18:07:16 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 235e90c1d760ea38f2af6bf4de2cc9355b89d24c
      https://github.com/llvm/llvm-project/commit/235e90c1d760ea38f2af6bf4de2cc9355b89d24c
  Author: eopXD <yueh.ting.chen at gmail.com>
  Date:   2023-02-13 (Mon, 13 Feb 2023)

  Changed paths:
    M clang/include/clang/AST/Type.h
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/Sema.cpp
    M clang/lib/Sema/SemaRISCVVectorLookup.cpp
    A clang/test/Sema/riscv-vector-float16-check.c
    M clang/utils/TableGen/RISCVVEmitter.cpp

  Log Message:
  -----------
  [Clang][RISCV] Guard vector float16 type correctly with semantic analysis

Before this commit, vector float 16 types (e.g. `vfloat16m1_t`) of RVV
is only defined when extension `zvfh` is defined. However this
generate inaccurate diagnostics like:

```
error: unknown type name 'vfloat16m1_t'
```

This commit improves the compiler by guarding type check correctly
under semantic analysis.

Reviewed By: craig.topper

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




More information about the All-commits mailing list