public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/40987] ifcvt sometimes goes wrong for integer modes > 64bit Date: Fri, 02 Jun 2023 00:56:08 +0000 [thread overview] Message-ID: <bug-40987-4-U9HNnnUmg2@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-40987-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40987 --- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Here is a x86_64-linux-gnu testcase: ``` #include <stdio.h> typedef __int128_t mytype; #define value (((__int128_t)(((unsigned long long)__LONG_LONG_MAX__)+1)) | (((__int128_t)0xffffffffffffffffull)<<64)) mytype func(long arg) __attribute__((noinline,noclone)); mytype func(long arg) { mytype val = 0; if (arg < 0) { // __int128_t t = 0x8000000000000000ull | (((__int128_t)0xffffffffffffffff)<<64); val = value; } return val; } int main() { mytype result = func(-1); if (result != value) { printf("failed.\n"); return 1; } printf("passed.\n"); return 0; } ``` It failed until GCC 4.9.0
next prev parent reply other threads:[~2023-06-02 0:56 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-40987-4@http.gcc.gnu.org/bugzilla/> 2012-01-21 21:33 ` [Bug rtl-optimization/40987] Wrong optimization with if-conversion pinskia at gcc dot gnu.org 2021-07-19 23:50 ` [Bug rtl-optimization/40987] ifcvt sometimes goes wrong for integer modes > 64bit pinskia at gcc dot gnu.org 2023-06-02 0:56 ` pinskia at gcc dot gnu.org [this message] 2023-06-02 1:02 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-40987-4-U9HNnnUmg2@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).