[PATCH, take 2] Fix PR 18503

Uros Bizjak uros@kss-loka.si
Thu Nov 18 11:57:00 GMT 2004


Hello!

This patch fixes PR18503, including "sse2_movhpd" issues. The code from 
previous testcases now produces expected results for all optimization 
levels.

The problem is, that sse_movss, sse2_movsd and sse2_movhpd patterns have 
wrong vec_merge selector bitmask. After fixing these, a problem with 
_mm_storel_pd() intrinsic function arised:

/usr/local.uros/lib/gcc/i686-pc-linux-gnu/4.0.0/include/emmintrin.h: In
function "_mm_storel_pd"
/usr/local.uros/lib/gcc/i686-pc-linux-gnu/4.0.0/include/emmintrin.h:959: 
interna
l compiler error: in instantiate_virtual_regs_lossage, at function.c:1441
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

This issue was fixed by splitting current sse2_movsd pattern back into 
movsd and movlpd part, where movlpd insn is generated in the same way as 
movupd insn.

Patch was bootstrapped and regtested on i686-pc-linux-gnu

BTW: This bug is also present in 3.3.x and 3.4.x gcc releases.

2004-11-18  Uros Bizjak  <uros@kss-loka.si>

    PR target/18503
    * configure/i386/i386.c (ix86_expand_builtin)
    [IX86_BUILTIN_LOADHPD, IX86_BUILTIN_STOREHPD]: Use
    CODE_FOR_sse2_movlpd.
    * configure/i386/i386.md (sse_movss, sse2_movsd, sse2_movhpd):
    Fix wrong vec_merge selector bitmask.
    (sse2_movsd): Do not generate movlpd insn.
    (sse2_movlpd): New pattern.

Uros.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sse.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20041118/b0495398/attachment.ksh>


More information about the Gcc-patches mailing list