public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/103168] New: Value numbering of pure functions can be improved
@ 2021-11-10 11:15 hubicka at gcc dot gnu.org
  2021-11-10 11:16 ` [Bug tree-optimization/103168] " hubicka at gcc dot gnu.org
                   ` (18 more replies)
  0 siblings, 19 replies; 22+ messages in thread
From: hubicka at gcc dot gnu.org @ 2021-11-10 11:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103168

            Bug ID: 103168
           Summary: Value numbering of pure functions can be improved
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hubicka at gcc dot gnu.org
  Target Milestone: ---

In the following testcase the call to test is loop invariant because memory
modified is not escaping. While value numbering of pure functions we however
add value number of the vdef corresponding to vuse.

I think we want to walk the chain to aliasing store?

__attribute__((const)) int test();
int
main()
{
        int ret;
        int a[10];
        for (int i=0; i<10;i++)
          if (test())
                  a[i]++;
        for (int i=0; i<10;i++)
                ret *= a[i];
        return ret;
}

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2021-11-24 12:06 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-10 11:15 [Bug tree-optimization/103168] New: Value numbering of pure functions can be improved hubicka at gcc dot gnu.org
2021-11-10 11:16 ` [Bug tree-optimization/103168] " hubicka at gcc dot gnu.org
2021-11-11  9:12 ` [Bug tree-optimization/103168] Value numbering for PRE " rguenth at gcc dot gnu.org
2021-11-17 20:28 ` hubicka at gcc dot gnu.org
2021-11-18  9:13 ` rguenth at gcc dot gnu.org
2021-11-18  9:39 ` hubicka at kam dot mff.cuni.cz
2021-11-18  9:40 ` hubicka at kam dot mff.cuni.cz
2021-11-19 14:21 ` [Bug tree-optimization/103168] [9/10/11/12 Regression] " hubicka at gcc dot gnu.org
2021-11-22 12:54 ` [Bug tree-optimization/103168] " rguenth at gcc dot gnu.org
2021-11-22 13:07 ` hubicka at kam dot mff.cuni.cz
2021-11-22 14:19 ` rguenth at gcc dot gnu.org
2021-11-22 14:24 ` rguenth at gcc dot gnu.org
2021-11-22 15:14 ` hubicka at kam dot mff.cuni.cz
2021-11-22 23:07 ` hubicka at gcc dot gnu.org
2021-11-23  0:26   ` Jan Hubicka
2021-11-23  7:26   ` Jan Hubicka
2021-11-23  0:26 ` hubicka at kam dot mff.cuni.cz
2021-11-23  7:26 ` hubicka at kam dot mff.cuni.cz
2021-11-23  7:43 ` rguenth at gcc dot gnu.org
2021-11-23  7:49 ` hubicka at gcc dot gnu.org
2021-11-24 11:40 ` cvs-commit at gcc dot gnu.org
2021-11-24 12:06 ` rguenth at gcc dot gnu.org

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).