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 08:44:55 +0000 [thread overview] Message-ID: <bug-102124-4-fJwIgQrTRZ@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 #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Before vectorization the loop body is: _1 = a_19(D) + i_29; _2 = *_1; _3 = (int) _2; _4 = b_20(D) + i_29; _5 = *_4; _6 = (int) _5; _7 = _3 - _6; ab_21 = _7 | ab_25; _10 = _6 - _3; ba_22 = _10 | ba_27; where _2 and _5 are unsigned char and _3, _6, _7, _10 are int. It is vectorized as vect_patt_54.17_61 = WIDEN_MINUS_LO_EXPR <vect__2.13_56, vect__5.16_17>; vect_patt_54.17_62 = WIDEN_MINUS_HI_EXPR <vect__2.13_56, vect__5.16_17>; vect_patt_53.18_63 = [vec_unpack_lo_expr] vect_patt_54.17_61; vect_patt_53.18_64 = [vec_unpack_hi_expr] vect_patt_54.17_61; vect_patt_53.18_65 = [vec_unpack_lo_expr] vect_patt_54.17_62; vect_patt_53.18_66 = [vec_unpack_hi_expr] vect_patt_54.17_62; _7 = _3 - _6; vect_ab_21.19_67 = vect_patt_53.18_63 | vect_ab_25.9_13; vect_ab_21.19_68 = vect_patt_53.18_64 | vect_ab_21.19_67; vect_ab_21.19_69 = vect_patt_53.18_65 | vect_ab_21.19_68; vect_ab_21.19_70 = vect_patt_53.18_66 | vect_ab_21.19_69; ab_21 = _7 | ab_25; which means it is vectorized as if it was instead of (int) _2 - (int) _6 (int) (unsigned short) ((unsigned short) _2 - (unsigned short) _6).
next prev parent reply other threads:[~2021-08-30 8:44 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 [this message] 2021-08-30 9:28 ` changyp6 at gmail dot com 2021-08-30 10:05 ` jakub at gcc dot gnu.org 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-fJwIgQrTRZ@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).