This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/70600] Missed tree optimization with multiple additions in different types.
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 11 Jul 2016 07:16:02 +0000
- Subject: [Bug tree-optimization/70600] Missed tree optimization with multiple additions in different types.
- Auto-submitted: auto-generated
- References: <bug-70600-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70600
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
CC| |pinskia at gcc dot gnu.org
Severity|normal |enhancement
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I have seen other cases which need to be handled by FRE/PRE instead of
reassiocate.
Even the simple:
int f(int a, int b, int d)
{
unsigned a1 = a;
unsigned b1 = b;
unsigned c1 = a + b;
int c = c1;
if (d)
c = a + b;
return c;
}
Note I think FRE handles the above incorrectly as it converts the safe unsigned
addition to non safe signed addition. I will file a different bug about that
issue.