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 middle-end/108623] We need to grow the precision field in tree_type_common for PowerPC Date: Mon, 08 May 2023 12:03:49 +0000 [thread overview] Message-ID: <bug-108623-4-8MKBurXtJU@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108623-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108623 --- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>: https://gcc.gnu.org/g:e2b993db57f90fedd1bd7756f7ad4c5bfded4b8f commit r14-577-ge2b993db57f90fedd1bd7756f7ad4c5bfded4b8f Author: Michael Meissner <meissner@linux.ibm.com> Date: Wed Feb 1 12:30:19 2023 -0500 Bump up precision size to 16 bits. The new __dmr type that is being added as a possible future PowerPC instruction set bumps into a structure field size issue. The size of the __dmr type is 1024 bits. The precision field in tree_type_common is currently 10 bits, so if you store 1,024 into field, you get a 0 back. When you get 0 in the precision field, the ccp pass passes this 0 to sext_hwi in hwint.h. That function in turn generates a shift that is equal to the host wide int bit size, which is undefined as machine dependent for shifting in C/C++. int shift = HOST_BITS_PER_WIDE_INT - prec; return ((HOST_WIDE_INT) ((unsigned HOST_WIDE_INT) src << shift)) >> shift; It turns out the x86_64 where I first did my tests returns the original input before the two shifts, while the PowerPC always returns 0. In the ccp pass, the original input is -1, and so it worked. When I did the runs on the PowerPC, the result was 0, which ultimately led to the failure. 2023-02-01 Richard Biener <rguenther@suse.de> Michael Meissner <meissner@linux.ibm.com> PR middle-end/108623 * tree-core.h (tree_type_common): Bump up precision field to 16 bits. Align bit fields > 1 bit to at least an 8-bit boundary.
next prev parent reply other threads:[~2023-05-08 12:03 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-01 8:00 [Bug other/108623] New: " meissner at gcc dot gnu.org 2023-02-01 8:18 ` [Bug middle-end/108623] " rguenth at gcc dot gnu.org 2023-02-01 8:21 ` rguenth at gcc dot gnu.org 2023-02-01 10:16 ` rsandifo at gcc dot gnu.org 2023-02-01 16:48 ` meissner at gcc dot gnu.org 2023-02-01 17:32 ` segher at gcc dot gnu.org 2023-02-01 17:37 ` meissner at gcc dot gnu.org 2023-02-01 17:40 ` meissner at gcc dot gnu.org 2023-02-01 18:52 ` joseph at codesourcery dot com 2023-02-02 8:22 ` rguenther at suse dot de 2023-02-02 9:04 ` rsandifo at gcc dot gnu.org 2023-05-08 12:03 ` cvs-commit at gcc dot gnu.org [this message] 2023-05-08 12:05 ` rguenth 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-108623-4-8MKBurXtJU@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).