On 12/12/2021 12:57 PM, Jan Hubicka wrote:
On 12/12/2021 3:49 AM, Jan Hubicka via Gcc-patches wrote:
Hi,
As discussed in the PR, we miss some optimization becuase
gimple-ssa-isolate-paths turns NULL memory accesses to volatile and adds
__builtin_trap after them. This is seen as a side-effec
>
> I think this is common pattern in C++ code originating from cast with
> multiple inheritance. I would vote towards optimizing out the conditial
> move in this case and I think it is correct.
I crafted a testcse and filled in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103674
Honza
>
> Honza
>
>
> On 12/12/2021 3:49 AM, Jan Hubicka via Gcc-patches wrote:
> > Hi,
> > As discussed in the PR, we miss some optimization becuase
> > gimple-ssa-isolate-paths turns NULL memory accesses to volatile and adds
> > __builtin_trap after them. This is seen as a side-effect by IPA analysis
> > and
On 12/12/2021 3:49 AM, Jan Hubicka via Gcc-patches wrote:
Hi,
As discussed in the PR, we miss some optimization becuase
gimple-ssa-isolate-paths turns NULL memory accesses to volatile and adds
__builtin_trap after them. This is seen as a side-effect by IPA analysis
and additionally the (fully
> >+ /* NULL memory accesses terminates BB. These accesses are known
> >+ to trip undefined behaviour. gimple-ssa-isolate-paths turns them
> >+ to volatile accesses and adds builtin_trap call which would
> >+ confuse us otherwise. */
> >+ if (infer_nonnull_range
On Sun, Dec 12, 2021 at 4:34 AM Richard Biener via Gcc-patches
wrote:
>
> On December 12, 2021 11:49:12 AM GMT+01:00, Jan Hubicka via Gcc-patches
> wrote:
> >Hi,
> >As discussed in the PR, we miss some optimization becuase
> >gimple-ssa-isolate-paths turns NULL memory accesses to volatile and ad
On December 12, 2021 11:49:12 AM GMT+01:00, Jan Hubicka via Gcc-patches
wrote:
>Hi,
>As discussed in the PR, we miss some optimization becuase
>gimple-ssa-isolate-paths turns NULL memory accesses to volatile and adds
>__builtin_trap after them. This is seen as a side-effect by IPA analysis
>and
Hi,
As discussed in the PR, we miss some optimization becuase
gimple-ssa-isolate-paths turns NULL memory accesses to volatile and adds
__builtin_trap after them. This is seen as a side-effect by IPA analysis
and additionally the (fully unreachable) builtin_trap is believed to load
all global memor