public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/109173] New: incorrect intrinsic signature for _mm_srai_epi64
@ 2023-03-17 11:47 malat at debian dot org
  2023-03-17 11:51 ` [Bug c/109173] " jakub at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: malat at debian dot org @ 2023-03-17 11:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109173

            Bug ID: 109173
           Summary: incorrect intrinsic signature for _mm_srai_epi64
           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 -mavx512vl -O2
tu.c
tu.c: In function 'foo':
tu.c:7:30: error: conversion to 'int' from 'unsigned int' may change the sign
of the result [-Werror=sign-conversion]
    7 |     return _mm_srai_epi64(a, bar());
      |                              ^~~~~
cc1: all warnings being treated as errors

with:

% cat tu.c
#include <immintrin.h>

extern unsigned int bar();

__m128i foo(__m128i a)
{
    return _mm_srai_epi64(a, bar());
}

intel documentation declares it as unsigned int

*
https://www.intel.com/content/www/us/en/docs/cpp-compiler/developer-guide-reference/2021-8/intrinsics-for-shift-operations.html

[...]
__m128i _mm_srai_epi64(__m128i a, unsigned int imm)
[...]

% /usr/lib/gcc-snapshot/bin/gcc --version
gcc (Debian 20230315-1) 13.0.1 20230315 (experimental) [master
r13-6680-ga9ae16db8cb]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-05-25 18:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-17 11:47 [Bug c/109173] New: incorrect intrinsic signature for _mm_srai_epi64 malat at debian dot org
2023-03-17 11:51 ` [Bug c/109173] " jakub at gcc dot gnu.org
2023-03-17 12:03 ` jakub at gcc dot gnu.org
2023-03-17 12:04 ` malat at debian dot org
2023-03-17 12:12 ` jakub at gcc dot gnu.org
2023-03-17 14:32 ` [Bug target/109173] " jan.wassenberg at gmail dot com
2023-03-20  5:23 ` crazylht at gmail dot com
2023-05-25  8:08 ` cvs-commit at gcc dot gnu.org
2023-05-25  8:51 ` crazylht at gmail dot com
2023-05-25 18:36 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).