[PATCH, middle-end]: Fix PR middle-end/23831
Uros Bizjak
ubizjak@gmail.com
Mon Sep 26 08:57:00 GMT 2005
Hello!
This patch fixes i386 target problem, exposed by vectorized multiply
insn patterns. The problem is, that a TImode (128bit) constant is
produced, but target supports only 64bit (DImode) constants.
Proposed patch fixes this problem in middle-end. If requested subreg
mode is wider than 2 * HOST_BITS_PER_WIDE_INT, simply skip
immed_double_const simplifications.
For attached testcase, following asm is produced (-O2 -msse2 -ftree-vectorize):
foo:
pushl %ebp
movl $bm.1591, %eax
movdqa .LC0, %xmm3
movl %esp, %ebp
movl $bm.1591, %edx
.p2align 4,,15
.L2:
movdqa (%eax), %xmm0
movdqa %xmm3, %xmm1
movdqa %xmm0, %xmm2
psrldq $4, %xmm1
psrldq $4, %xmm0
pmuludq %xmm3, %xmm2
pmuludq %xmm1, %xmm0
addl $4, %edx
pshufd $8, %xmm2, %xmm2
pshufd $8, %xmm0, %xmm0
punpckldq %xmm0, %xmm2
movdqa %xmm2, (%eax)
addl $16, %eax
cmpl $bm.1591+16, %edx
jne .L2
popl %ebp
ret
Patch is regtested on i686-pc-linux-gnu for c and c++. If patch is OK,
could someone commit it to mainline CVS?
:ADDPATCH middle-end:
2005-09-26 Uros Bizjak <uros@kss-loka.si>
PR middle-end/23831
* simplify-rtx.c (simplify_immed_subreg) [MODE_INT]: Skip
simplification if elem_bitsize > 2 * HOST_BITS_PER_WIDE_INT
testsuite/ChangeLog:
2005-09-26 Uros Bizjak <uros@kss-loka.si>
PR middle-end/23831
* gcc.dg/vect/pr23831.c: New test.
Uros.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr23831.diff
Type: application/octet-stream
Size: 531 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20050926/58b8601b/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr23831.c
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20050926/58b8601b/attachment.c>
More information about the Gcc-patches
mailing list