public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/109885] New: gcc does not generate movmskps and testps instructions  (clang does)
@ 2023-05-17  7:40 vincenzo.innocente at cern dot ch
  2023-05-17  7:44 ` [Bug target/109885] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2023-05-17  7:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109885
           Summary: gcc does not generate movmskps and testps instructions
                     (clang does)
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vincenzo.innocente at cern dot ch
  Target Milestone: ---

in this simple code (on avx2)

int sum(float const * x) {
   int ret = 0;
   for (int i=0; i<8; ++i) ret +=(0==x[i]);
   return ret;
}

int one(float const * x) {
   int ret = 0;
   for (int i=0; i<8; ++i) ret |=(0==x[i]);
   return ret;
}

int all(float const * x) {
   int ret = 1;
   for (int i=0; i<8; ++i) ret &=(0==x[i]);
   return ret;
}

clang uses movmskps and testps instructions, gcc does not

see for instance

https://godbolt.org/z/r11r8xoYz

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

end of thread, other threads:[~2024-02-18  3:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-17  7:40 [Bug tree-optimization/109885] New: gcc does not generate movmskps and testps instructions (clang does) vincenzo.innocente at cern dot ch
2023-05-17  7:44 ` [Bug target/109885] " pinskia at gcc dot gnu.org
2023-05-17 14:51 ` pinskia at gcc dot gnu.org
2023-05-17 15:31 ` pinskia at gcc dot gnu.org
2024-02-10  9:53 ` [Bug tree-optimization/109885] " pinskia at gcc dot gnu.org
2024-02-18  3:09 ` liuhongt 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).