public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/101796] New: Miss optimization to optimized (vashl op0, (op1: const_duplicate_vector)) to (ashl op0 op1_inner)
@ 2021-08-06  3:22 crazylht at gmail dot com
  2021-08-06  3:23 ` [Bug target/101796] " crazylht at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: crazylht at gmail dot com @ 2021-08-06  3:22 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101796
           Summary: Miss optimization to optimized (vashl op0, (op1:
                    const_duplicate_vector)) to (ashl op0 op1_inner)
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: crazylht at gmail dot com
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-*-* i?86-*-*

#include <immintrin.h>

__m512i
foo (__m512i a, short b)
{
  return _mm512_srlv_epi16 (a, _mm512_set1_epi16 (3));
}

llvm generate 

vpsrlw  zmm0, zmm0, 3

but gcc generate

foo(long long __vector(8), short):
        movl    $3, %eax
        vpbroadcastw    %eax, %zmm31
        vpsrlvw %zmm31, %zmm0, %zmm0
        ret

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

end of thread, other threads:[~2021-12-15  8:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06  3:22 [Bug target/101796] New: Miss optimization to optimized (vashl op0, (op1: const_duplicate_vector)) to (ashl op0 op1_inner) crazylht at gmail dot com
2021-08-06  3:23 ` [Bug target/101796] " crazylht at gmail dot com
2021-08-06  6:27 ` crazylht at gmail dot com
2021-08-27  7:26 ` pinskia at gcc dot gnu.org
2021-08-27  7:34 ` crazylht at gmail dot com
2021-12-15  8:27 ` cvs-commit at gcc dot gnu.org
2021-12-15  8:27 ` crazylht at gmail 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).