github / github/codeql

CodeQL seems to produce many warnings when compiling source that includes AVX-512 extensions

Đang mở
#16,999 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
question
Ngôn ngữ chính
CodeQL
Star
10.1k
Fork
2.1k
Merge trung bình
2 ngày 15 giờ
Pull request đã merge (30 ngày)
141

Mô tả

Hi there,

I'm filing this all as one bug in case they share a root cause, because it seems somewhat likely to me they all share the same root cause. Please let me know if that's not the case and I can parse these out into separate bug reports.

But: when compiling Chromium, we see a lot of warnings (on the order of ~190,000) related to the inclusion of the following Clang headers:

* avx512vlbf16intrin.h
* avx512vlfp16intrin.h
* avx512fintrin.h

Some sample warnings include:

```
Warning[extractor-c++]: In construct_text_message: "/b/s/w/ir/x/w/src/third_party/llvm-build/Release+Asserts/lib/clang/19/include/avx512vlbf16intrin.h", line 41: error: invalid type conversion
return (__m128bh)__builtin_ia32_cvtne2ps2bf16_128((__v4sf) __A,
^
```
and

```
Warning[extractor-c++]: In construct_text_message: "/b/s/w/ir/x/w/src/third_party/llvm-build/Release+Asserts/lib/clang/19/include/avx512vlbf16intrin.h", line 65: error: argument of type "__v8bf" is incompatible with parameter of type "__attribute((vector_size(32))) __bf16"
(__v8bf)_mm_cvtne2ps_pbh(__A, __B),
^
```

and

```
Warning[extractor-c++]: In construct_text_message: "/b/s/w/ir/x/w/src/third_party/llvm-build/Release+Asserts/lib/clang/19/include/avx512vlfp16intrin.h", line 967: error: invalid type conversion
return (__m128i)__builtin_ia32_vcvtph2udq128_mask(
^
```

and

```
Warning[extractor-c++]: In construct_text_message: "/b/s/w/ir/x/w/src/third_party/llvm-build/Release+Asserts/lib/clang/19/include/avx512fintrin.h", line 484: error: identifier "__builtin_nondeterministic_value" is undefined
__m256i __B = __builtin_nondeterministic_value(__B);
^
```

I'm wondering if this is already a known issue / something on the roadmap to support (perhaps SIMD-related code requires extra support)? If not, would it be helpful for me to provide a reproducer for one of these instances (as a representative sample), or do you think these in fact represent many different classes of issue and you'd like more of a breakdown than that?

Thanks very much!

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.