From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20973 invoked by alias); 9 Oct 2006 16:33:33 -0000 Received: (qmail 20895 invoked by uid 48); 9 Oct 2006 16:33:25 -0000 Date: Mon, 09 Oct 2006 16:33:00 -0000 Message-ID: <20061009163325.20894.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug rtl-optimization/29294] 4.1, 4.2 (possibly 4.0?) not finding postmodify address mode on ARM In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ramana dot radhakrishnan at codito dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-10/txt/msg00715.txt.bz2 List-Id: ------- Comment #7 from ramana dot radhakrishnan at codito dot com 2006-10-09 16:33 ------- (In reply to comment #5) flow.c is responsible for generating POST_INCs and POST_MODIFY's in 3.4 / 4.0 / 4.1 / 4.2 . I believe this is being replaced by the new data flow bits in the data flow branch. This might not be ready until 4.3 . We have hit similar issues in a private port that I maintain. 2 options are either to fix flow.c or use some of Joern's auto increment patches for 4.1 / 4.2 to fix this issue. This doesn't really take care of POST_MODIFY but I don't think that affects ARM that much. > Here's what's going on in this case: > > CSE changes an address if: > A) The cost of the address is lower > or > B) The cost of the address is the same and the cost of the RTX would be > higher outside of an address > > So, CSE changes (R) to (R+4) because it is lower cost as specified by the > address_costs hook. > > It doesn't change beyond (R+4) because (R+8) is the same cost as (R+4). > > Once the address (R+4) gets in the RTL sequence, it never gets converted to > a postincrement form. > > So by adding the cost of a simple REG RTX as being lower than (+ (REG) (CONST)) > in the addressing modes, CSE doesn't convert the address to base+offset, and > we get the postincrement code back again in 4.x. > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29294