public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/109702] New: [14 Regression] Wrong code with if and __builtin_bswap and others
@ 2023-05-02 17:33 pinskia at gcc dot gnu.org
  2023-05-02 17:34 ` [Bug tree-optimization/109702] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-02 17:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109702
           Summary: [14 Regression] Wrong code with if and __builtin_bswap
                    and others
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: critical
          Priority: P3
         Component: tree-optimization
          Assignee: pinskia at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

I totally messed up the match.pd patterns such that we start to transform:
```
unsigned f(unsigned t, unsigned t1)
{
  if (t != 0)
    return __builtin_bswap32(t1);
  return 0;
}
```
To just `return __builtin_bswap32(t1)` . I only noticed this after the review
of the patch for CLRSB
(https://gcc.gnu.org/pipermail/gcc-patches/2023-May/617228.html ) but the
review didn't fully notice how it was incorrect; just noticed there was an
unused capture.

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

end of thread, other threads:[~2023-05-02 22:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-02 17:33 [Bug tree-optimization/109702] New: [14 Regression] Wrong code with if and __builtin_bswap and others pinskia at gcc dot gnu.org
2023-05-02 17:34 ` [Bug tree-optimization/109702] " pinskia at gcc dot gnu.org
2023-05-02 21:47 ` cvs-commit at gcc dot gnu.org
2023-05-02 22:05 ` 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).