public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/106243] New: Failure to optimize (0 - x) & 1 on vector type
@ 2022-07-10  8:40 gabravier at gmail dot com
  2022-07-10 20:29 ` [Bug tree-optimization/106243] Failure to optimize (0 - x) & 1 on gimple level (including vector types) pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: gabravier at gmail dot com @ 2022-07-10  8:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106243
           Summary: Failure to optimize (0 - x) & 1 on vector type
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gabravier at gmail dot com
  Target Milestone: ---

#include <stdint.h>

typedef int64_t v2i64 __attribute__((vector_size(16)));

v2i64 f(v2i64 x)
{
    return (0 - x) & 1;
}

This can be optimized to `return x & 1;`. LLVM does this transformation, but
GCC does not

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

end of thread, other threads:[~2022-08-11  8:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-10  8:40 [Bug tree-optimization/106243] New: Failure to optimize (0 - x) & 1 on vector type gabravier at gmail dot com
2022-07-10 20:29 ` [Bug tree-optimization/106243] Failure to optimize (0 - x) & 1 on gimple level (including vector types) pinskia at gcc dot gnu.org
2022-08-04 13:37 ` cvs-commit at gcc dot gnu.org
2022-08-06 21:41 ` roger at nextmovesoftware dot com
2022-08-11  8:29 ` cvs-commit 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).