------- Comment #7 from hjl dot tools at gmail dot com 2010-08-20 16:54 -------
Created an attachment (id=21531)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21531&action=view)
A patch
I talked to icc people. They think the return value should be
zero-extended to reflex what hardware does. However, we need to
optimize out sign_extend in:
(insn:TI 9 7 10 (set (reg:SI 0 ax [orig:68 D.6819 ] [68])
(zero_extend:SI (vec_select:QI (reg:V16QI 21 xmm0 [orig:64 x ] [64])
(parallel [
(const_int 4 [0x4])
]))))
/export/build/gnu/gcc/build-x86_64-linux/gcc/include/smmintrin.h:442 1681
{*sse4_1_pextrb}
(expr_list:REG_DEAD (reg:V16QI 21 xmm0 [orig:64 x ] [64])
(nil)))
(insn:TI 10 9 18 (set (reg:DI 0 ax [orig:67 D.6819 ] [67])
(sign_extend:DI (reg:SI 0 ax [orig:68 D.6819 ] [68]))) foo.c:3 126
{extendsidi2_rex64}
(nil))
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45336