public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114425] wrong code with _BitInt() __builtin_add_overflow_p() and __builtin_mul_overflow_p() at -O2 Date: Sat, 23 Mar 2024 10:19:39 +0000 [thread overview] Message-ID: <bug-114425-4-nsj3kinE0p@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-114425-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114425 --- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:f92cf8cbbe199bda70d0dd7893e8c8836777e2d0 commit r14-9640-gf92cf8cbbe199bda70d0dd7893e8c8836777e2d0 Author: Jakub Jelinek <jakub@redhat.com> Date: Sat Mar 23 11:19:09 2024 +0100 bitint: Handle complex types in build_bitint_stmt_ssa_conflicts [PR114425] The task of the build_bitint_stmt_ssa_conflicts hook for tree-ssa-coalesce.cc next to special casing the multiplication/division/modulo is to ignore statements with large/huge _BitInt lhs which isn't in names bitmap and on the other side pretend all uses of the stmt are used in a later stmt (single user of that SSA_NAME or perhaps single user of lhs of the single user etc.) where the lowering will actually emit the code. Unfortunately the function wasn't handling COMPLEX_TYPE of the large/huge BITINT_TYPE, while the FE doesn't really support such types, they are used under the hood for __builtin_{add,sub,mul}_overflow{,_p}, they are also present or absent from the names bitmap and should be treated the same. Without this patch, the operands of .ADD_OVERFLOW were incorrectly pretended to be used right in that call statement rather than on the cast stmt from IMAGPART_EXPR of .ADD_OVERFLOW return value to some integral type. 2024-03-23 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/114425 * gimple-lower-bitint.cc (build_bitint_stmt_ssa_conflicts): Handle _Complex large/huge _BitInt types like the large/huge _BitInt types. * gcc.dg/torture/bitint-67.c: New test.
next prev parent reply other threads:[~2024-03-23 10:19 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-22 4:15 [Bug tree-optimization/114425] New: wrong code with _BitInt() __builtin_add_overflow_p() " zsojka at seznam dot cz 2024-03-22 11:37 ` [Bug tree-optimization/114425] " zsojka at seznam dot cz 2024-03-22 11:50 ` [Bug tree-optimization/114425] wrong code with _BitInt() __builtin_add_overflow_p() and __builtin_mul_overflow_p() " jakub at gcc dot gnu.org 2024-03-22 11:57 ` zsojka at seznam dot cz 2024-03-22 11:57 ` zsojka at seznam dot cz 2024-03-22 14:02 ` jakub at gcc dot gnu.org 2024-03-22 14:18 ` jakub at gcc dot gnu.org 2024-03-23 10:19 ` cvs-commit at gcc dot gnu.org [this message] 2024-03-23 10:21 ` jakub 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-114425-4-nsj3kinE0p@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).