CodeQL seems to produce many warnings when compiling source that includes AVX-512 extensions
- Vorherrschende Sprache
- CodeQL
- Sterne
- 10.1k
- Forks
- 2.1k
- Ø Merge
- 2 T. 15 Std.
- Gemergte PRs (30 T.)
- 141
Beschreibung
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!
Beitragsleitfaden
Rechercherichtung
Beginne damit, die Warnungen des CodeQL C++ extractors zu reproduzieren, während du Chromium mit den genannten Clang-Headern kompilierst: avx512vlbf16intrin.h, avx512vlfp16intrin.h und avx512fintrin.h. Vergleiche die Berichte zu ungültigen Konvertierungen, inkompatiblen Vektortypen und undefinierten Built-ins, um festzustellen, ob sie auf dasselbe extractor-Problem zurückgehen; abgeschlossen ist die Aufgabe, wenn die Ursache isoliert ist und die Warnungen behoben oder in umsetzbare Bugs aufgeteilt sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp
- Bereich
- compilers
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100