[all-commits] [llvm/llvm-project] 9312d5: [llvm][RISCV] Handle required features of intrinsi...

Brandon Wu via All-commits all-commits at lists.llvm.org
Tue Jun 10 00:59:36 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9312d5beb37208f30118ec7bc42737b1ecead086
      https://github.com/llvm/llvm-project/commit/9312d5beb37208f30118ec7bc42737b1ecead086
  Author: Brandon Wu <songwu0813 at gmail.com>
  Date:   2025-06-10 (Tue, 10 Jun 2025)

  Changed paths:
    M clang/include/clang/Basic/riscv_andes_vector.td
    M clang/include/clang/Basic/riscv_sifive_vector.td
    M clang/include/clang/Basic/riscv_vector.td
    M clang/include/clang/Basic/riscv_vector_common.td
    M clang/include/clang/Support/RISCVVIntrinsicUtils.h
    M clang/lib/Sema/SemaRISCV.cpp
    M clang/lib/Support/RISCVVIntrinsicUtils.cpp
    M clang/test/CodeGen/RISCV/rvv-intrinsics-handcrafted/zvfhmin-error.c
    M clang/test/Sema/rvv-required-features-invalid.c
    M clang/test/Sema/zvk-invalid-features.c
    M clang/test/Sema/zvk-invalid-zvknha.c
    M clang/test/Sema/zvk-target-attributes.c
    M clang/utils/TableGen/RISCVVEmitter.cpp

  Log Message:
  -----------
  [llvm][RISCV] Handle required features of intrinsic correctly (#143062)

Current approach generates intrinsic records when users specify
corresponding required features by using command line option.
However it's not able to handle features passed by using target
attributes correctly where each function might have different
features.
This patch resolves this by generating all of intrinsic records which
carry the required features in their function declaration using
attribute and check the required extensions in CheckBuiltinFunctionCall.

This should fix
[56592](https://github.com/llvm/llvm-project/issues/56592),
[134962](https://github.com/llvm/llvm-project/issues/134962) and
[121603](https://github.com/llvm/llvm-project/issues/121603)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list