From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17586 invoked by alias); 20 Jun 2009 03:56:39 -0000 Received: (qmail 17527 invoked by uid 48); 20 Jun 2009 03:56:21 -0000 Date: Sat, 20 Jun 2009 03:56:00 -0000 Message-ID: <20090620035621.17526.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/40499] [missed optimization] branch to return In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "carrot at google dot com" 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: 2009-06/txt/msg01404.txt.bz2 ------- Comment #1 from carrot at google dot com 2009-06-20 03:56 ------- Created an attachment (id=18027) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18027&action=view) test case The command line options are: -march=armv5te -mthumb -Os At the end of the function we can see b .L3 // This one can be replaced by pop {pc} .L5: mov r0, #1 .L3: @ sp needed for prologue pop {pc} With option -O2 we can get similar result. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40499