This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/65752] Too strong optimizations int -> pointer casts
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 24 Oct 2016 07:44:52 +0000
- Subject: [Bug tree-optimization/65752] Too strong optimizations int -> pointer casts
- Auto-submitted: auto-generated
- References: <bug-65752-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65752
--- Comment #54 from rguenther at suse dot de <rguenther at suse dot de> ---
On Fri, 21 Oct 2016, law at redhat dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65752
>
> --- Comment #53 from Jeffrey A. Law <law at redhat dot com> ---
> And presumably walking forward/backward from the equivalency point to determine
> if an object is derived from or is used to derive a pointer is insufficient
> because the equivalency point and casting to/from pointer types might be in
> different functions?
Yes.
> Is this the final straw and do we just stop recording these conditional
> equivalences when both sides are SSA_NAMEs and declare the fallout
> unavoidable?
I haven't made up my mind on a possible good solution here. But yes,
it would mean to not propagate any equivalences derived from conditionals,
not even symbolic constants such as &a btw.
> And note I believe we do similar stuff in the RTL optimizers too.
RTL has it's own share of issues, see the linked PR about its
very optimistic treating of "base value"s.