This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This patch optimizes VEC_SELECT nested RTL expressions (with optional VEC_CONCAT), when top VEC_SELECT extracts scalar operand.
--cut here-- int fooSI_1(__v4si *val) { return __builtin_ia32_vec_ext_v4si(*val, 1); }
int fooSI_2(__v4si *val) { return __builtin_ia32_vec_ext_v4si(*val, 2); } --cut here--
fooSI_2: subl $4, %esp movl 8(%esp), %eax movdqa (%eax), %xmm0 punpckhdq %xmm0, %xmm0 movd %xmm0, (%esp) movl (%esp), %eax addl $4, %esp ret
fooSI_1: subl $4, %esp movl 8(%esp), %eax pshufd $85, (%eax), %xmm0 movd %xmm0, (%esp) movl (%esp), %eax addl $4, %esp ret
fooSI_2: movl 4(%esp), %eax movl 8(%eax), %eax ret
fooSI_1: movl 4(%esp), %eax movl 4(%eax), %eax ret
PR target/32661 * simplify-rtx.c (simplify_binary_operation_1) [VEC_SELECT]: Simplify nested VEC_SELECT (with optional VEC_CONCAT operator as operand) when top VEC_SELECT extracts scalar element. * config/i386/sse.md (*vec_extract_v4si_mem): New. (*vec_extract_v4sf_mem): Ditto.
PR target/32661 * gcc.target/i386/pr32661.c: New test.
Attachment:
pr32661.diff.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |