From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BE21F38582B0; Fri, 17 Mar 2023 12:05:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE21F38582B0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679054734; bh=Som8u2cSYujZdrpDaL64rlgw9HKkuh6Lq+M8c+NUGuk=; h=From:To:Subject:Date:From; b=bA0KWU3naNCnbKUwIRmkHVZZmAQRwjRdX+8jrWajdlcr9VtoYXtj08KqeSbvJQY8Q DOZ8PPasYufCJnde6a779GXutBpud8B13OVtkm+8tY1HhgKyovH9J857WKD7QwfRGy 7qRE4H0NvMloHwpjaqP8el0YvxrLyGgXt0YbpZtI= From: "malat at debian dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/109174] New: incorrect intrinsic signature for AVX-512 srai* Date: Fri, 17 Mar 2023 12:05:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: malat at debian dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109174 Bug ID: 109174 Summary: incorrect intrinsic signature for AVX-512 srai* Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: malat at debian dot org Target Milestone: --- gcc-13 currently rejects the following: % /usr/lib/gcc-snapshot/bin/gcc -c -Wsign-conversion -Werror -mavx512bw -O2 tu2.c tu2.c: In function 'foo': tu2.c:7:24: error: conversion to 'int' from 'unsigned int' may change the s= ign of the result [-Werror=3Dsign-conversion] 7 | _mm512_slli_epi16(a, bar()); | ^~~~~ tu2.c:8:24: error: conversion to 'int' from 'unsigned int' may change the s= ign of the result [-Werror=3Dsign-conversion] 8 | _mm512_srai_epi16(a, bar()); | ^~~~~ tu2.c:9:24: error: conversion to 'int' from 'unsigned int' may change the s= ign of the result [-Werror=3Dsign-conversion] 9 | _mm512_srli_epi16(a, bar()); | ^~~~~ cc1: all warnings being treated as errors with % cat tu2.c #include extern unsigned int bar(); void foo(__m512i a) { _mm512_slli_epi16(a, bar()); _mm512_srai_epi16(a, bar()); _mm512_srli_epi16(a, bar()); } intel documentation declares it as unsigned int https://www.intel.com/content/www/us/en/docs/cpp-compiler/developer-guide-r= eference/2021-8/intrinsics-for-shift-operations.html [...] __m512i _mm512_slli_epi16(__m512i a, unsigned int imm) [...] % /usr/lib/gcc-snapshot/bin/gcc --version gcc (Debian 20230315-1) 13.0.1 20230315 (experimental) [master r13-6680-ga9ae16db8cb]=