public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110381] [11/12/13/14 Regression] double counting for sum of structs of floating point types Date: Mon, 26 Jun 2023 09:41:51 +0000 [thread overview] Message-ID: <bug-110381-4-YaDgERva7N@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-110381-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110381 --- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> --- OK, so we transform the in-order FOLD_LEFT_REDUCTION as # sum_22 = PHI <sum_15(5), 0.0(2)> # vectp_foos.7_25 = PHI <vectp_foos.7_23(5), foos_12(D)(2)> ... vect_foo_c_8.9_21 = MEM <vector(2) double> [(double *)vectp_foos.7_25]; vectp_foos.7_20 = vectp_foos.7_25 + 16; vect_foo_c_8.10_7 = MEM <vector(2) double> [(double *)vectp_foos.7_20]; vectp_foos.7_6 = vectp_foos.7_25 + 32; vect_foo_c_8.11_5 = MEM <vector(2) double> [(double *)vectp_foos.7_6]; stmp_sum_13.12_4 = BIT_FIELD_REF <vect_foo_c_8.9_21, 64, 0>; stmp_sum_13.12_31 = sum_22 + stmp_sum_13.12_4; stmp_sum_13.12_32 = BIT_FIELD_REF <vect_foo_c_8.9_21, 64, 64>; stmp_sum_13.12_33 = stmp_sum_13.12_31 + stmp_sum_13.12_32; stmp_sum_13.12_34 = BIT_FIELD_REF <vect_foo_c_8.10_7, 64, 0>; stmp_sum_13.12_35 = stmp_sum_13.12_33 + stmp_sum_13.12_34; stmp_sum_13.12_36 = BIT_FIELD_REF <vect_foo_c_8.10_7, 64, 64>; stmp_sum_13.12_37 = stmp_sum_13.12_35 + stmp_sum_13.12_36; stmp_sum_13.12_38 = BIT_FIELD_REF <vect_foo_c_8.11_5, 64, 0>; stmp_sum_13.12_39 = stmp_sum_13.12_37 + stmp_sum_13.12_38; stmp_sum_13.12_40 = BIT_FIELD_REF <vect_foo_c_8.11_5, 64, 64>; foo$a_11 = _3->a; foo$b_9 = _3->b; foo$c_8 = _3->c; sum_13 = stmp_sum_13.12_39 + stmp_sum_13.12_40; sum_14 = foo$b_9 + sum_13; sum_15 = foo$a_11 + sum_14; where you can see the final step updates one but not the last scalar stmt in the SLP reduction group. That causes us to keep the scalar reads live and apply some elements multiple times.
next prev parent reply other threads:[~2023-06-26 9:41 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-06-23 18:06 [Bug c++/110381] New: Incorrect loop unrolling for " lennox.ho at intel dot com 2023-06-23 18:08 ` [Bug c++/110381] " lennox.ho at intel dot com 2023-06-23 19:48 ` [Bug tree-optimization/110381] [11/12/13/14 Regression] double counting for sum of " pinskia at gcc dot gnu.org 2023-06-23 20:01 ` lennox.ho at intel dot com 2023-06-23 20:07 ` pinskia at gcc dot gnu.org 2023-06-23 22:34 ` mpolacek at gcc dot gnu.org 2023-06-26 8:58 ` rguenth at gcc dot gnu.org 2023-06-26 9:33 ` rguenth at gcc dot gnu.org 2023-06-26 9:41 ` rguenth at gcc dot gnu.org [this message] 2023-06-26 10:50 ` rguenth at gcc dot gnu.org 2023-06-26 12:18 ` cvs-commit at gcc dot gnu.org 2023-06-26 12:18 ` [Bug tree-optimization/110381] [11/12/13 " rguenth at gcc dot gnu.org 2023-06-29 16:01 ` clyon at gcc dot gnu.org 2023-06-30 6:35 ` cvs-commit at gcc dot gnu.org 2023-06-30 6:40 ` rguenth at gcc dot gnu.org 2023-06-30 14:05 ` clyon at gcc dot gnu.org 2023-06-30 20:50 ` pinskia at gcc dot gnu.org 2023-07-03 7:54 ` clyon at gcc dot gnu.org 2023-07-03 7:57 ` pinskia at gcc dot gnu.org 2023-07-03 8:03 ` cvs-commit at gcc dot gnu.org 2023-07-03 8:05 ` clyon at gcc dot gnu.org 2023-07-07 12:06 ` [Bug tree-optimization/110381] [11/12 " cvs-commit 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-110381-4-YaDgERva7N@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).