From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27247 invoked by alias); 26 Apr 2010 14:43:30 -0000 Received: (qmail 27098 invoked by uid 48); 26 Apr 2010 14:43:04 -0000 Date: Mon, 26 Apr 2010 14:43:00 -0000 Message-ID: <20100426144304.27096.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug rtl-optimization/43892] PowerPC suboptimal "add with carry" optimization In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" 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-04/txt/msg02731.txt.bz2 ------- Comment #5 from rguenth at gcc dot gnu dot org 2010-04-26 14:43 ------- (In reply to comment #4) > Subject: Re: PowerPC suboptimal "add with carry" optimization > > "dje at gcc dot gnu dot org" wrote on 2010/04/26 > 15:53:01: > > > > ------- Comment #3 from dje at gcc dot gnu dot org 2010-04-26 13:52 ------- > > As Jakub mentioned, i386.md implements the addcc named pattern and rs6000.md > > does not provide that named pattern yet. > > Will that also address the loop optimization? I don't think so. No. Actually compilable testcase: typedef unsigned int u32; u32 add32carry(u32 sum, u32 x) { u32 z = sum + x; if (sum + x < x) z++; return z; } u32 loop(u32 *buf, int len) { u32 sum = 0; for(; len; --len) sum = add32carry(sum, *++buf); return sum; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43892