public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/112706] missed simplification in FRE
Date: Fri, 24 Nov 2023 21:36:50 +0000 [thread overview]
Message-ID: <bug-112706-4-Y0LYefQ6R2@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112706-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112706
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> That is:
> ```
> (for op (eq ne)
> (simplify
> (op (pointer_plus @0 @1) (pointer_plus @0 @2))
> (op @1 @2))
>
> ```
Note I am missing a extra `)` but then I Noticed in the full testcase (that is
located in https://gcc.gnu.org/pipermail/gcc-patches/2023-November/638130.html)
which was originally reported we still end up with:
```
_76 = _71 + 4;
# .MEM_154 = VDEF <.MEM_153>
x_3(D)->D.25942._M_implD.25172.D.25249._M_finishD.25175 = _76;
# .MEM_7 = VDEF <.MEM_154>
D.26033 = 0;
# .MEM_157 = VDEF <.MEM_7>
*_76 = 0;
# PT = nonlocal escaped
_82 = _71 + 8;
# .MEM_158 = VDEF <.MEM_157>
x_3(D)->D.25942._M_implD.25172.D.25249._M_finishD.25175 = _82;
# .MEM_8 = VDEF <.MEM_158>
D.26033 ={v} {CLOBBER(eol)};
# .MEM_9 = VDEF <.MEM_8>
D.26034 = 0;
if (_66 != _82)
```
After pre (note the first comparison is gone but not the second one and maybe a
3rd). So this patch helps but it looks like a PRE/VN improvement is still
needed to fix the others.
next prev parent reply other threads:[~2023-11-24 21:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-24 19:52 [Bug middle-end/112706] New: " hubicka at gcc dot gnu.org
2023-11-24 19:58 ` [Bug tree-optimization/112706] " pinskia at gcc dot gnu.org
2023-11-24 21:36 ` pinskia at gcc dot gnu.org [this message]
2023-11-24 21:52 ` hubicka at ucw dot cz
2023-11-27 8:03 ` rguenth at gcc dot gnu.org
2023-11-27 8:43 ` rguenth at gcc dot gnu.org
2023-11-27 9:43 ` cvs-commit at gcc dot gnu.org
2023-11-27 9:44 ` 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-112706-4-Y0LYefQ6R2@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).