From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10220 invoked by alias); 28 Aug 2005 23:15:40 -0000 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 Received: (qmail 10200 invoked by uid 48); 28 Aug 2005 23:15:38 -0000 Date: Sun, 28 Aug 2005 23:25:00 -0000 Message-ID: <20050828231538.10199.qmail@sourceware.org> From: "ian at airs dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050828200424.23605.kevin@planetsaphire.com> References: <20050828200424.23605.kevin@planetsaphire.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug target/23605] memset() Optimization on x86-32 bit X-Bugzilla-Reason: CC X-SW-Source: 2005-08/txt/msg03225.txt.bz2 List-Id: ------- Additional Comments From ian at airs dot com 2005-08-28 23:15 ------- I didn't realize that this was at -O0. Extra register moves at -O0 are not a bug. -O0 means no optimization. I think it is odd that we open code memset at -O0 but not at -O1. I don't know the rationale behind that. The comment in the code explaining why we don't open code this case by default is: /* In case we don't know anything about the alignment, default to library version, since it is usually equally fast and result in shorter code. But that does not explain why we open code at -O0. I think the open coding at -O0 is most likely a bug, as -O0 code should emphasize debuggability, and open coding prevents the user from setting a breakpoint. As pinskia says, the -minline-all-stringops option forces the call to be opencoded. And I agree with him that the bug report about extra register moves at -O0 is invalid. If you want optimal code, compile with optimization. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23605