public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/102124] [11/12 Regression] -ftree-loop-vectorize Causing Data To Lose Sign Bit on AARCH64 Platform Date: Mon, 30 Aug 2021 10:05:57 +0000 [thread overview] Message-ID: <bug-102124-4-7xqqfWFq0s@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-102124-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102124 --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I think the bug is in vect_recog_widen_op_pattern. When we have half_type unsigned, for PLUS_EXPR, MULT_EXPR (and supposedly LSHIFT_EXPR) it is ok that itype is twice the precision and same sign as half_type, say unsigned char uc1 = 0xfe, uc2 = 0xff; int t1 = uc1, t2 = uc2; t1 + t2 (or t1 * t2) wants to perform the widening operation and then zero-extend to the result type. But MINUS_EXPR seems to be special, t1 - t2 is negative despite half_type being unsigned (and, even if type is unsigned, such as for unsigned u1 = uc1, u2 = uc2; u1 - u2 wants sign-extension from unsigned short (aka itype) to unsigned int (aka type) rather than zero-extension.
next prev parent reply other threads:[~2021-08-30 10:05 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-30 8:07 [Bug c/102124] New: GCC 11.2.1 -ftree-loop-vectorize Causing Data To Lose Sign Bit changyp6 at gmail dot com 2021-08-30 8:11 ` [Bug c/102124] " changyp6 at gmail dot com 2021-08-30 8:32 ` [Bug target/102124] [11/12 Regression] -ftree-loop-vectorize Causing Data To Lose Sign Bit on AARCH64 Platform jakub at gcc dot gnu.org 2021-08-30 8:44 ` jakub at gcc dot gnu.org 2021-08-30 9:28 ` changyp6 at gmail dot com 2021-08-30 10:05 ` jakub at gcc dot gnu.org [this message] 2021-08-30 10:07 ` [Bug tree-optimization/102124] " jakub at gcc dot gnu.org 2021-08-30 10:15 ` jakub at gcc dot gnu.org 2021-09-01 4:19 ` changyp6 at gmail dot com 2021-09-01 11:40 ` cvs-commit at gcc dot gnu.org 2021-09-01 11:41 ` cvs-commit at gcc dot gnu.org 2021-09-01 11:48 ` 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-102124-4-7xqqfWFq0s@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).