This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/14844] [tree-ssa] narrow types if wide result is not needed for unsigned types or when wrapping is true
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Apr 2006 14:57:21 -0000
- Subject: [Bug tree-optimization/14844] [tree-ssa] narrow types if wide result is not needed for unsigned types or when wrapping is true
- References: <bug-14844-5009@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #11 from rguenth at gcc dot gnu dot org 2006-04-20 14:57 -------
We now generate
return (int) ((unsigned int) (long long int) b + (unsigned int) (long long
int) a);
which is harder to optimize. But with -fwrapv and GVN tree-combiner we get
aa_2 = (long long int) a_1;
bb_4 = (long long int) b_3;
D.1527_5 = a_1;
D.1528_6 = b_3;
D.1526_7 = D.1527_5 + D.1528_6;
return D.1526_7;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14844