------- Additional Comments From law at redhat dot com 2005-03-06 19:56 ------- Subject: Re: [meta-bug] optimizations that CSE still catches
On Sun, 2005-03-06 at 09:30 +0000, stevenb at suse dot de wrote: > ------- Additional Comments From stevenb at suse dot de 2005-03-06 09:30 > ------- > Subject: Re: [meta-bug] optimizations that CSE still catches > > On Sunday 06 March 2005 06:59, law at redhat dot com wrote: > > Ah. Yes. What did it look like in the tree dumps? Unless > > one of the expanders is creating the negation I would think this > > would be pretty easy to catch in fold-const.c > > This is PR20130. We don't fold -1*x to -x, ie. we never > fold the MULT_EXPR to a NEGATE_EXPR. PR20130 has a patch. Ok. That should be pretty easy to fix. > > > expand_mult? Sigh. That's been in the back of my mind for a couple > > years now -- it's probably one of the largest RTL expanders which > > needs to have a lot of its functionality moved into trees. > > That'd be nice. > > In this case, Roger found out that for DImode negative constants > it completely bypasses expand_mult_const. Fixing that would help > for now. expand_mult, expand_divmod and the switch expanders are the biggies IMHO. One of the tricks with the mult and divmod expanders is precisely when should we expand them into their component operations. We clearly don't want to do it at the very start or the very end of hte SSA path, but somewhere in the middle. jeff -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19721