From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21894 invoked by alias); 4 Sep 2010 14:11:57 -0000 Received: (qmail 21844 invoked by alias); 4 Sep 2010 14:11:39 -0000 Date: Sat, 04 Sep 2010 14:11:00 -0000 Message-ID: <20100904141139.21843.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/45522] VRP misses oppurtunity for statement folding. In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenther at suse dot de" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-09/txt/msg00565.txt.bz2 ------- Comment #10 from rguenther at suse dot de 2010-09-04 14:11 ------- Subject: Re: VRP misses oppurtunity for statement folding. On Sat, 4 Sep 2010, hubicka at gcc dot gnu dot org wrote: > ------- Comment #9 from hubicka at gcc dot gnu dot org 2010-09-04 13:51 ------- > Hi, > thanks. In meantime I made tree-ssa-pre to fold statements it produces and it > gets me to bootstrapland with sanity check in expr.c except for Ada (with the > patches I sent so far) Well - that's a workaround and will cause us to miss PRE because we do not fold during translation of expressions. So I wouldn't go down that route. > So it seems that I need to basically duplicate all logic for initializer > folding from tree-ssa-ccp.c into this function, right? I guess it makes sense, > but it is all quite ugly. Yes ;) > On VN side, i wondered if we can retire more of expand this way. For example > dojump knows that: > a = b ror x; > if (a != 0) > can be folded into: > if (b != 0) > (ror is rotation). I guess we should do this kind of tricks in VN instead? Well ... it's not that easy (that's not CSE but tree-combining, so the specific thing would fit to forwprop). Richard. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45522