public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/103665] New: insert_trap in gimple-isolate-paths interferes badly with modref, pure-const and other optimizations
@ 2021-12-11 22:03 hubicka at gcc dot gnu.org
  2021-12-12 10:38 ` [Bug tree-optimization/103665] " cvs-commit at gcc dot gnu.org
  2022-01-04  9:36 ` rguenth at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: hubicka at gcc dot gnu.org @ 2021-12-11 22:03 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103665
           Summary: insert_trap in gimple-isolate-paths interferes badly
                    with modref, pure-const and other optimizations
           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: ---

When we detect load/store of NULL memory we produce:
  _9 ={v} MEM[(union tree_node *)0B].base.code;                                 
  __builtin_trap ();                                                            

The volatile memory store is intended to keep program segfaulting as it did
before. However this representation is bad because it is now considered a
significant side-effects.  This prevents such function from being discovered as
pure/const and prevents other useful optimizations too

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

end of thread, other threads:[~2022-01-04  9:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-11 22:03 [Bug tree-optimization/103665] New: insert_trap in gimple-isolate-paths interferes badly with modref, pure-const and other optimizations hubicka at gcc dot gnu.org
2021-12-12 10:38 ` [Bug tree-optimization/103665] " cvs-commit at gcc dot gnu.org
2022-01-04  9:36 ` 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).