public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "crazylht at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/110711] possible missed optimization for std::max with -march=znver2 Date: Wed, 19 Jul 2023 06:57:39 +0000 [thread overview] Message-ID: <bug-110711-4-tIYTjbH5oI@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-110711-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110711 --- Comment #4 from Hongtao.liu <crazylht at gmail dot com> --- <bb 18> [local count: 105119324]: _6 = .LOOP_VECTORIZED (1, 2); if (_6 != 0) goto <bb 19>; [100.00%] else goto <bb 20>; [100.00%] <bb 19> [local count: 105119324]: <bb 5> [local count: 955630227]: # i_21 = PHI <i_16(10), 1(19)> # prephitmp_19 = PHI <prephitmp_24(10), _1(19)> _2 = i_21 * 8; _3 = a_10(D) + _2; _17 = MEM[(const double &)_3]; _29 = MAX_EXPR <_17, prephitmp_19>; prephitmp_24 = _29; i_16 = i_21 + 1; if (n_els_7(D) > i_16) goto <bb 10>; [89.00%] else goto <bb 13>; [11.00%] <bb 13> [local count: 105119324]: # prephitmp_15 = PHI <_29(5), prephitmp_27(16)> goto <bb 8>; [100.00%] <bb 10> [local count: 850510903]: goto <bb 5>; [100.00%] test.C:8:26: note: Analyze phi: prephitmp_19 = PHI <prephitmp_24(10), _1(19)> test.C:8:26: note: reduction path: prephitmp_24 _29 prephitmp_19 test.C:8:26: note: reduction: unknown pattern test.C:8:26: missed: Unknown def-use cycle pattern. test.C:8:26: note: === vect_determine_precisions === It looks like there's extra move generate by ifcvt which make vectorizer think it's not a reduction. prephitmp_24 can be replaced with _29 since it's not used elsewhere.
next prev parent reply other threads:[~2023-07-19 6:57 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-07-18 10:11 [Bug middle-end/110711] New: " mrks2023 at proton dot me 2023-07-18 10:37 ` [Bug middle-end/110711] " crazylht at gmail dot com 2023-07-18 10:38 ` crazylht at gmail dot com 2023-07-18 12:03 ` rguenth at gcc dot gnu.org 2023-07-18 12:03 ` rguenth at gcc dot gnu.org 2023-07-19 6:57 ` crazylht at gmail dot com [this message] 2023-07-19 8:34 ` crazylht at gmail dot com 2023-07-19 8:37 ` crazylht at gmail dot com 2023-07-19 8:41 ` crazylht at gmail dot com
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-110711-4-tIYTjbH5oI@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).