From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5948 invoked by alias); 25 Jun 2010 16:44:16 -0000 Received: (qmail 5668 invoked by uid 48); 25 Jun 2010 16:43:46 -0000 Date: Fri, 25 Jun 2010 16:44:00 -0000 Message-ID: <20100625164346.5667.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug rtl-optimization/44659] Combiner fails to match QI cmp patterns with upper 8bit register In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "hjl dot tools at gmail 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: 2010-06/txt/msg02483.txt.bz2 ------- Comment #3 from hjl dot tools at gmail dot com 2010-06-25 16:43 ------- Another testcase: [hjl@gnu-6 44659]$ cat extract-3.c typedef struct { unsigned char c1; unsigned char c2; unsigned char c3; unsigned char c4; } foo_t; int foo (foo_t x) { return x.c2 != 0; } [hjl@gnu-6 44659]$ make extract-3.s /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc -B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -Os -S extract-3.c [hjl@gnu-6 44659]$ cat extract-3.s .file "extract-3.c" .text .globl foo .type foo, @function foo: .LFB0: .cfi_startproc movl %edi, %eax movzbl %ah, %edi xorl %eax, %eax testb %dil, %dil setne %al ret movzbl %ah, %edi testb %dil, %dil can be combined into one instruction. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44659