[PATCH, i386]: Committed: Optimize MMX moves.

Uros Bizjak ubizjak@gmail.com
Sun Feb 24 17:50:00 GMT 2008


Kaveh R. GHAZI wrote:

> I'm getting a -fpic/-fPIC failure in gcc.target/i386/pr34256.c:
> http://gcc.gnu.org/ml/gcc-testresults/2008-02/msg01643.html
>   

We have do add two unrelated movs to load address of variables for PIC 
targets. Fixed by the patch below.

Patch was tested on x86_64-pc-linux-gnu and is committed to mainline.

2008-02-24  Uros Bizjak  <ubizjak@gmail.com>

        * gcc.target/i386/pr34256.c: Update number of mov insns
        for PIC targets.


Index: gcc.target/i386/pr34256.c
===================================================================
--- gcc.target/i386/pr34256.c   (revision 132585)
+++ gcc.target/i386/pr34256.c   (working copy)
@@ -11,4 +11,5 @@
   return _mm_cvtm64_si64(_mm_add_pi32(x, y));
 }
 
-/* { dg-final { scan-assembler-times "mov" 2 } } */
+/* { dg-final { scan-assembler-times "mov" 2 { target nonpic } } } */
+/* { dg-final { scan-assembler-times "mov" 4 { target { ! nonpic } } } } */




More information about the Gcc-patches mailing list