[clang] [FMV][RISCV] Add __riscv_feature_bits.length check (PR #110098)

2024-09-26 Thread Piyou Chen via cfe-commits
BeMg wrote: There is misunderstand here. Close it now and reopen when it ready. https://github.com/llvm/llvm-project/pull/110098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV][RISCV] Add __riscv_feature_bits.length check (PR #110098)

2024-09-26 Thread Piyou Chen via cfe-commits
https://github.com/BeMg closed https://github.com/llvm/llvm-project/pull/110098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV][RISCV] Add __riscv_feature_bits.length check (PR #110098)

2024-09-26 Thread Philip Reames via cfe-commits
preames wrote: Why? There has only ever been one version of the features array, and that has not yet been published. Why do we need a version check here at all? https://github.com/llvm/llvm-project/pull/110098 ___ cfe-commits mailing list cfe-commit

[clang] [FMV][RISCV] Add __riscv_feature_bits.length check (PR #110098)

2024-09-26 Thread Jessica Clarke via cfe-commits
https://github.com/jrtc27 edited https://github.com/llvm/llvm-project/pull/110098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV][RISCV] Add __riscv_feature_bits.length check (PR #110098)

2024-09-26 Thread Jessica Clarke via cfe-commits
@@ -2970,22 +2974,28 @@ void CodeGenFunction::EmitRISCVMultiVersionResolver( // (__riscv_feature_bits.features[i] & REQUIRED_BITMASK) == // REQUIRED_BITMASK // +// First, check __riscv_feature_bits.length <= +// llvm::RISCVISAInfo::FeatureBitSize. This ensur

[clang] [FMV][RISCV] Add __riscv_feature_bits.length check (PR #110098)

2024-09-26 Thread Piyou Chen via cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/110098 >From 838c6669d2f4464b9b528b0d633ad363b92e3b57 Mon Sep 17 00:00:00 2001 From: Piyou Chen Date: Thu, 26 Sep 2024 02:16:56 -0700 Subject: [PATCH 1/2] [FMV][RISCV] Check FeatureBits.length before test all version ---

[clang] [FMV][RISCV] Add __riscv_feature_bits.length check (PR #110098)

2024-09-26 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 23487be4903630a4c06160562fb939f6389aa99d 838c6669d2f4464b9b528b0d633ad363b92e3b57 --e

[clang] [FMV][RISCV] Add __riscv_feature_bits.length check (PR #110098)

2024-09-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Piyou Chen (BeMg) Changes This patch add a condition that check the `__riscv_feature_bits.length` before access `__riscv_feature_bits.features`. It updates the resolver function as the following structure. ``` if (__riscv_feat

[clang] [FMV][RISCV] Add __riscv_feature_bits.length check (PR #110098)

2024-09-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Piyou Chen (BeMg) Changes This patch add a condition that check the `__riscv_feature_bits.length` before access `__riscv_feature_bits.features`. It updates the resolver function as the following structu

[clang] [FMV][RISCV] Add __riscv_feature_bits.length check (PR #110098)

2024-09-26 Thread Piyou Chen via cfe-commits
https://github.com/BeMg created https://github.com/llvm/llvm-project/pull/110098 This patch add a condition that check the `__riscv_feature_bits.length` before access `__riscv_feature_bits.features`. It updates the resolver function as the following structure. ``` if (__riscv_feature_bits.fe