public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/113722] New: Folding of __builtin_bswap128 doesn't work anymore
@ 2024-02-02 15:24 bouanto at zoho dot com
  2024-02-02 16:12 ` [Bug middle-end/113722] [14 Regression] Constant folding of __builtin_bswap128 is broken pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: bouanto at zoho dot com @ 2024-02-02 15:24 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113722
           Summary: Folding of __builtin_bswap128 doesn't work anymore
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: regression
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bouanto at zoho dot com
  Target Milestone: ---

With the following code:

#include <stdio.h>

int main(int argc, char* argv[]) {
    __uint128_t res = __builtin_bswap128 (2);
    printf("Value: %ld\n", res >> 64);
    res = __builtin_bswap128 (argc + 1);
    printf("Value: %ld\n", res >> 64);
}

it gives the following output in gcc 13.2.1:

Value: 144115188075855872
Value: 144115188075855872

while it gives the following output in the master branch, commit
2c27aa8d75113f404bf9cd39364611af386d9719:

Value: 0
Value: 144115188075855872

So it seems to be a regression in the folding of wide_int::bswap.

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

end of thread, other threads:[~2024-02-03 19:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-02 15:24 [Bug regression/113722] New: Folding of __builtin_bswap128 doesn't work anymore bouanto at zoho dot com
2024-02-02 16:12 ` [Bug middle-end/113722] [14 Regression] Constant folding of __builtin_bswap128 is broken pinskia at gcc dot gnu.org
2024-02-02 16:50 ` jakub at gcc dot gnu.org
2024-02-02 16:57 ` [Bug middle-end/113722] [14 Regression] Constant folding of __builtin_bswap128 is broken since r14-1455 jakub at gcc dot gnu.org
2024-02-02 17:30 ` jakub at gcc dot gnu.org
2024-02-03 13:39 ` cvs-commit at gcc dot gnu.org
2024-02-03 19:45 ` jakub 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).