public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/53533] [10/11/12/13 regression] vectorization causes loop unrolling test slowdown as measured by Adobe's C++Benchmark
Date: Mon, 30 May 2022 09:14:44 +0000 [thread overview]
Message-ID: <bug-53533-4-b9V2EYjDy7@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-53533-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53533
--- Comment #48 from rguenther at suse dot de <rguenther at suse dot de> ---
On Mon, 30 May 2022, crazylht at gmail dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53533
>
> --- Comment #47 from Hongtao.liu <crazylht at gmail dot com> ---
>
> >
> > The issue is that the re-association pass doesn't handle operations
> > with undefined overflow behavior, we do have duplicate bugreports
> > for this.
> >
>
> I saw below in match.pd
>
> 478/* Combine successive multiplications. Similar to above, but handling
> 479 overflow is different. */
> 480(simplify
> 481 (mult (mult @0 INTEGER_CST@1) INTEGER_CST@2)
> 482 (with {
> 483 wi::overflow_type overflow;
> 484 wide_int mul = wi::mul (wi::to_wide (@1), wi::to_wide (@2),
> 485 TYPE_SIGN (type), &overflow);
> 486 }
> 487 /* Skip folding on overflow: the only special case is @1 * @2 ==
> -INT_MIN,
> 488 otherwise undefined overflow implies that @0 must be zero. */
> 489 (if (!overflow || TYPE_OVERFLOW_WRAPS (type))
> 490 (mult @0 { wide_int_to_tree (type, mul); }))))
>
> Can it be extend to (mult (plus_minus (mult @0 INTEGER_CST@1) INTEGER_CST@3)
> INTEGER_CST@2), so at least we can handle it under -fwrapv?
With -fwrapv the reassoc pass might do this already (not sure with
mixing multiplication and addition, you'd have to try). But sure,
we could add a pattern for the above (with appropriate single-use
handling).
next prev parent reply other threads:[~2022-05-30 9:14 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-31 0:55 [Bug middle-end/53533] New: [4.7 regression] loop unrolling as measured by Adobe's C++Benchmark is twice as slow versus 4.4-4.6 matt at use dot net
2012-05-31 0:58 ` [Bug middle-end/53533] " matt at use dot net
2012-05-31 9:59 ` rguenth at gcc dot gnu.org
2012-06-11 19:56 ` matt at use dot net
2012-06-11 19:57 ` matt at use dot net
2012-06-11 20:02 ` matt at use dot net
2012-06-12 9:54 ` [Bug rtl-optimization/53533] [4.7/4.8 regression] vectorization causes loop unrolling test slowdown as measured by Adobe's C++Benchmark rguenth at gcc dot gnu.org
2012-06-12 10:12 ` rguenth at gcc dot gnu.org
2012-06-12 10:27 ` rguenth at gcc dot gnu.org
2012-06-12 10:39 ` rguenth at gcc dot gnu.org
2012-06-12 11:57 ` rguenth at gcc dot gnu.org
2012-06-12 18:26 ` matt at use dot net
2012-06-12 18:55 ` rth at gcc dot gnu.org
2012-06-13 9:44 ` rguenth at gcc dot gnu.org
2012-06-14 14:39 ` rth at gcc dot gnu.org
2012-06-14 18:02 ` matt at use dot net
2012-06-14 18:39 ` rth at gcc dot gnu.org
2012-06-15 9:04 ` jakub at gcc dot gnu.org
2012-06-15 21:05 ` rth at gcc dot gnu.org
2012-08-10 9:43 ` rguenth at gcc dot gnu.org
2012-08-14 17:26 ` matt at use dot net
2012-08-20 23:53 ` matt at use dot net
2012-09-20 10:27 ` jakub at gcc dot gnu.org
2012-11-29 21:17 ` rth at gcc dot gnu.org
2012-12-03 15:27 ` rguenth at gcc dot gnu.org
2013-04-11 8:00 ` [Bug rtl-optimization/53533] [4.7/4.8/4.9 " rguenth at gcc dot gnu.org
2014-06-12 13:45 ` [Bug rtl-optimization/53533] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
2014-12-19 13:28 ` [Bug rtl-optimization/53533] [4.8/4.9/5 " jakub at gcc dot gnu.org
2015-05-03 13:00 ` [Bug rtl-optimization/53533] [4.8/4.9/5/6 " trippels at gcc dot gnu.org
2015-05-03 13:01 ` trippels at gcc dot gnu.org
2015-05-04 14:46 ` maltsevm at gmail dot com
2015-05-04 15:00 ` maltsevm at gmail dot com
2015-06-23 8:22 ` rguenth at gcc dot gnu.org
2015-06-26 19:58 ` [Bug rtl-optimization/53533] [4.9/5/6 " jakub at gcc dot gnu.org
2015-06-26 20:29 ` jakub at gcc dot gnu.org
2021-02-23 12:24 ` [Bug rtl-optimization/53533] [8/9/10/11 " rguenth at gcc dot gnu.org
2021-05-14 9:46 ` [Bug rtl-optimization/53533] [9/10/11/12 " jakub at gcc dot gnu.org
2021-06-01 8:05 ` rguenth at gcc dot gnu.org
2022-05-27 9:34 ` [Bug rtl-optimization/53533] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-05-30 6:40 ` crazylht at gmail dot com
2022-05-30 8:57 ` rguenther at suse dot de
2022-05-30 9:10 ` crazylht at gmail dot com
2022-05-30 9:14 ` rguenther at suse dot de [this message]
2022-06-16 1:29 ` cvs-commit at gcc dot gnu.org
2022-06-16 2:31 ` crazylht at gmail dot com
2022-06-28 10:30 ` jakub at gcc dot gnu.org
2023-07-07 10:29 ` [Bug rtl-optimization/53533] [11/12/13/14 " rguenth 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-53533-4-b9V2EYjDy7@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: link
Be 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).