This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/44659] Combiner fails to match QI cmp patterns with upper 8bit register
- From: "hjl dot tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jun 2010 16:43:46 -0000
- Subject: [Bug rtl-optimization/44659] Combiner fails to match QI cmp patterns with upper 8bit register
- References: <bug-44659-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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