Bug 65744 - Some AVX512 instrinsics take __mmask16 instead of __mmask8
Summary: Some AVX512 instrinsics take __mmask16 instead of __mmask8
Status: ASSIGNED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 5.0
: P3 normal
Target Milestone: ---
Assignee: Kirill Yukhin
URL:
Keywords:
Depends on:
Blocks: 88918
  Show dependency treegraph
 
Reported: 2015-04-12 12:10 UTC by Marc Glisse
Modified: 2021-11-30 08:04 UTC (History)
4 users (show)

See Also:
Host:
Target: x86_64-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed: 2018-02-20 00:00:00


Attachments
Proposed patch. (1.26 KB, text/plain)
2015-04-13 17:37 UTC, Kirill Yukhin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Glisse 2015-04-12 12:10:56 UTC
Compiling with -Wsystem-headers, I got the following warnings, which seem to point at a few mistakes (the intrinsic prototypes don't quite match Intel's documentation). I don't believe it can cause any problem, but we should still fix it.

usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/5.0.0/include/avx512vlintrin.h: In function '__m128i _mm_mask_mullo_epi32(__m128i, __mmask16, __m128i, __m128i)':
/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/5.0.0/include/avx512vlintrin.h:9050:26: warning: conversion to 'char' from '__mmask16 {aka short unsigned int}' may alter its value [-Wconversion]
         (__v4si) __W, __M);
                          ^

/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/5.0.0/include/avx512vlbwintrin.h: In function '__m128i _mm_mask_packus_epi32(__m128i, __mmask16, __m128i, __m128i)':
/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/5.0.0/include/avx512vlbwintrin.h:4314:28: warning: conversion to 'char' from '__mmask16 {aka short unsigned int}' may alter its value [-Wconversion]
           (__v8hi) __W, __M);
                            ^
/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/5.0.0/include/avx512vlbwintrin.h: In function '__m128i _mm_mask_packs_epi32(__m128i, __mmask16, __m128i, __m128i)':
/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/5.0.0/include/avx512vlbwintrin.h:4357:28: warning: conversion to 'char' from '__mmask16 {aka short unsigned int}' may alter its value [-Wconversion]
           (__v8hi) __W, __M);
                            ^
Comment 1 Kirill Yukhin 2015-04-13 12:45:59 UTC
Could be reproduced with:
 make -k check-gcc RUNTESTFLAGS="i386.exp=avx512f-vaddpd-1.c --target_board=unix/-Werror/-Wsystem-headers/-Wconversion"
Comment 2 Kirill Yukhin 2015-04-13 17:37:27 UTC
Created attachment 35306 [details]
Proposed patch.

Conversion of decls of masked built-ins to make
masking unsigned (QI/HI->UQI/UHI) is a matter of
separate  patch.
Comment 3 Eric Gallager 2018-02-20 10:15:34 UTC
(In reply to Kirill Yukhin from comment #1)
> Could be reproduced with:
>  make -k check-gcc RUNTESTFLAGS="i386.exp=avx512f-vaddpd-1.c
> --target_board=unix/-Werror/-Wsystem-headers/-Wconversion"

Taking this as confirmation; changing status to ASSIGNED since you made yourself the assignee. 

(In reply to Kirill Yukhin from comment #2)
> Created attachment 35306 [details]
> Proposed patch.
> 
> Conversion of decls of masked built-ins to make
> masking unsigned (QI/HI->UQI/UHI) is a matter of
> separate  patch.

Please send this patch to the gcc-patches mailing list.