From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18918 invoked by alias); 15 May 2009 16:25:06 -0000 Received: (qmail 18448 invoked by uid 48); 15 May 2009 16:24:36 -0000 Date: Fri, 15 May 2009 16:25:00 -0000 Message-ID: <20090515162436.18447.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/39942] Nonoptimal code - leaveq; xchg %ax,%ax; retq In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub 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: 2009-05/txt/msg01347.txt.bz2 ------- Comment #41 from jakub at gcc dot gnu dot org 2009-05-15 16:24 ------- The 34 resp. 51 4 branches in 16 byte page with the 3 patches together made me look at one of the cases which was wrong and the problem is that cmp $0x1d, %al has too large get_attr_lenght (insn) returned, 3 instead of 2, because GCC thinks it has modrm byte when it has not. Testing: --- gcc/config/i386/i386.md.jj2009-05-13 08:42:51.000000000 +0200 +++ gcc/config/i386/i386.md2009-05-15 18:06:40.000000000 +0200 @@ -504,6 +504,9 @@ (and (eq_attr "type" "callv") (match_operand 1 "constant_call_address_operand" "")) (const_int 0) + (and (eq_attr "type" "alu,alu1,icmp,test") + (match_operand 0 "ax_reg_operand" "")) + (symbol_ref "(get_attr_length_immediate (insn) > (get_attr_mode (insn) != MODE_QI))") ] (const_int 1))) now on top of the 3 patches (without the 4th) to see what it does to code size and number of 4+ branches in 16 byte page. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39942