[clang] [llvm] [RISCV] Support __builtin_cpu_is (PR #116231)

Pengcheng Wang via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 22 12:16:35 PST 2024


wangpc-pp wrote:

> Fails buildbot: https://lab.llvm.org/buildbot/#/builders/24/builds/2791/steps/10/logs/stdio
> 
> ```
> -- Testing: 83950 of 83951 tests, 48 workers --
> Testing:  0.. 10..
> FAIL: Clang :: Preprocessor/has_builtin_cpuid.c (15996 of 83950)
> ******************** TEST 'Clang :: Preprocessor/has_builtin_cpuid.c' FAILED ********************
> Exit Code: 1
> Command Output (stderr):
> --
> RUN: at line 1: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/lib/clang/20/include -nostdsysteminc -fsyntax-only -triple arm64-- -DARM -verify /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/clang/test/Preprocessor/has_builtin_cpuid.c
> + /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/lib/clang/20/include -nostdsysteminc -fsyntax-only -triple arm64-- -DARM -verify /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/clang/test/Preprocessor/has_builtin_cpuid.c
> RUN: at line 2: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/lib/clang/20/include -nostdsysteminc -fsyntax-only -triple x86_64-- -DX86 -verify /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/clang/test/Preprocessor/has_builtin_cpuid.c
> + /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/lib/clang/20/include -nostdsysteminc -fsyntax-only -triple x86_64-- -DX86 -verify /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/clang/test/Preprocessor/has_builtin_cpuid.c
> RUN: at line 3: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/lib/clang/20/include -nostdsysteminc -fsyntax-only -triple powerpc64-unknown-linux-gnu -DPPC    -verify /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/clang/test/Preprocessor/has_builtin_cpuid.c
> + /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/lib/clang/20/include -nostdsysteminc -fsyntax-only -triple powerpc64-unknown-linux-gnu -DPPC -verify /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/clang/test/Preprocessor/has_builtin_cpuid.c
> RUN: at line 5: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/lib/clang/20/include -nostdsysteminc -fsyntax-only -triple riscv32-unknown-linux-gnu -DRISCV    -verify /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/clang/test/Preprocessor/has_builtin_cpuid.c
> + /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/lib/clang/20/include -nostdsysteminc -fsyntax-only -triple riscv32-unknown-linux-gnu -DRISCV -verify /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/clang/test/Preprocessor/has_builtin_cpuid.c
> error: 'expected-error' diagnostics seen but not expected: 
>   File /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/clang/test/Preprocessor/has_builtin_cpuid.c Line 12: "ARM/RISCV shouldn't have __builtin_cpu_is"
> 1 error generated.
> --
> ```

Thanks for reporting, it has been fixed now.

https://github.com/llvm/llvm-project/pull/116231


More information about the cfe-commits mailing list