public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/107563] New: __builtin_shufflevector fails to use pshufb and pshufd instructions under default x86_64 compilation toggle which is the sse2 one
@ 2022-11-07 22:56 unlvsur at live dot com
  2022-11-07 23:00 ` [Bug target/107563] " unlvsur at live dot com
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: unlvsur at live dot com @ 2022-11-07 22:56 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107563
           Summary: __builtin_shufflevector fails to use pshufb and pshufd
                    instructions under default x86_64 compilation toggle
                    which is the sse2 one
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: unlvsur at live dot com
  Target Milestone: ---

#if defined(__SSE2__)

using temp_vec_type [[__gnu__::__vector_size__ (16)]] = char;
void foo(temp_vec_type& v) noexcept
{
        v=__builtin_shufflevector(v,v,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0);
}

#endif

g++ -S pq.cc -Ofast
proves sse2 is enabled by default, but it does not call
https://www.felixcloutier.com/x86/pshufb
neither
https://www.felixcloutier.com/x86/pshufd

while g++ -S pq.cc -Ofast -msse4.2 will generate them correctly. Which is buggy

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

end of thread, other threads:[~2024-05-18 15:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-07 22:56 [Bug rtl-optimization/107563] New: __builtin_shufflevector fails to use pshufb and pshufd instructions under default x86_64 compilation toggle which is the sse2 one unlvsur at live dot com
2022-11-07 23:00 ` [Bug target/107563] " unlvsur at live dot com
2022-11-07 23:05 ` [Bug target/107563] __builtin_shufflevector fails to " unlvsur at live dot com
2022-11-08  0:11 ` unlvsur at live dot com
2022-11-08  0:11 ` unlvsur at live dot com
2022-11-08  3:23 ` crazylht at gmail dot com
2022-11-08  3:33 ` crazylht at gmail dot com
2022-11-08  6:11 ` unlvsur at live dot com
2022-11-08  6:11 ` unlvsur at live dot com
2022-11-08  6:14 ` unlvsur at live dot com
2022-11-08  8:28 ` crazylht at gmail dot com
2024-05-15  4:47 ` cvs-commit at gcc dot gnu.org
2024-05-18 15:17 ` admin at levyhsu dot com

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).