github / github/codeql

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

Aperta
#16,999 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
question
Lingua principale
CodeQL
Stelle
10.1k
Fork
2.1k
Merge medio
2g 15h
PR unite (30g)
141

Descrizione

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!

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.