public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "liuhongt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/115406] [15 Regression] wrong code with vector compare at -O0 with -mavx512f since r15-920-gb6c6d5abf0d31c Date: Mon, 24 Jun 2024 03:03:32 +0000 [thread overview] Message-ID: <bug-115406-4-p2Rdo7Y3Bg@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-115406-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115406 --- Comment #7 from Hongtao Liu <liuhongt at gcc dot gnu.org> --- > > BTW, when assign -1 to vector(1) <signed-boolean:8>, should the upper bit be > cleared? Look like only 1 element boolean vector is cleared, but not > vector(2) <signed-boolean:8>. > If the upper bits are not cleared, both 2 cases are equal. diff --git a/gcc/fold-const.cc b/gcc/fold-const.cc index 710d697c021..0f045f851d1 100644 --- a/gcc/fold-const.cc +++ b/gcc/fold-const.cc @@ -8077,7 +8077,7 @@ native_encode_vector_part (const_tree expr, unsigned char *ptr, int len, { tree itype = TREE_TYPE (TREE_TYPE (expr)); if (VECTOR_BOOLEAN_TYPE_P (TREE_TYPE (expr)) - && TYPE_PRECISION (itype) <= BITS_PER_UNIT) + && TYPE_PRECISION (itype) < BITS_PER_UNIT) { /* This is the only case in which elements can be smaller than a byte. Element 0 is always in the lsb of the containing byte. */ Can fix this. It looks like it supposed to handle for itype *less than* but not *less equal* BITS_PER_UNIT?
prev parent reply other threads:[~2024-06-24 3:03 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-06-09 11:29 [Bug target/115406] New: [15 Regression] wrong code with vector compare at -O0 with -mavx512f zsojka at seznam dot cz 2024-06-09 16:44 ` [Bug target/115406] " pinskia at gcc dot gnu.org 2024-06-10 12:32 ` [Bug target/115406] [15 Regression] wrong code with vector compare at -O0 with -mavx512f since r15-920-gb6c6d5abf0d31c sjames at gcc dot gnu.org 2024-06-11 0:57 ` liuhongt at gcc dot gnu.org 2024-06-11 2:55 ` liuhongt at gcc dot gnu.org 2024-06-11 3:39 ` liuhongt at gcc dot gnu.org 2024-06-11 3:48 ` liuhongt at gcc dot gnu.org 2024-06-11 4:36 ` liuhongt at gcc dot gnu.org 2024-06-24 3:03 ` liuhongt at gcc dot gnu.org [this message]
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-115406-4-p2Rdo7Y3Bg@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).