]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Remove vpmacsdql instruction from multiplication
authorGanesh Gopalasubramanian <Ganesh.Gopalasubramanian@amd.com>
Mon, 16 Jun 2014 11:02:31 +0000 (11:02 +0000)
committerGanesh Gopalasubramanian <gganesh@gcc.gnu.org>
Mon, 16 Jun 2014 11:02:31 +0000 (11:02 +0000)
From-SVN: r211702

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/xop-imul64-vector.c

index 802f3d93c28dc62bc20916b2dfe45d17b0ddbb3c..7f242f2f0afc3433cfe571900a7ed65a55fe9f10 100644 (file)
@@ -1,3 +1,9 @@
+2014-06-16  Ganesh Gopalasubramanian <Ganesh.Gopalasubramanian@amd.com>
+
+       * config/i386/i386.c (ix86_expand_sse2_mulvxdi3): Issue 
+       instructions "vpmuludq" and "vpaddq" instead of "vpmacsdql" for 
+       handling 32-bit multiplication.
+
 2014-06-16  Chung-Lin Tang  <cltang@codesourcery.com>
 
        PR middle-end/61430
index d46f5832ecad41be29258c3846f318b3791f70a8..33226a9f9354e066c05da603c21a1c951b43d57e 100644 (file)
@@ -45279,8 +45279,13 @@ ix86_expand_sse2_mulvxdi3 (rtx op0, rtx op1, rtx op2)
       /* t4: ((B*E)+(A*F))<<32, ((D*G)+(C*H))<<32 */
       emit_insn (gen_ashlv2di3 (t4, t3, GEN_INT (32)));
 
-      /* op0: (((B*E)+(A*F))<<32)+(B*F), (((D*G)+(C*H))<<32)+(D*H) */
-      emit_insn (gen_xop_pmacsdql (op0, op1, op2, t4));
+      /* Multiply lower parts and add all */
+      t5 = gen_reg_rtx (V2DImode);
+      emit_insn (gen_vec_widen_umult_even_v4si (t5, 
+                                       gen_lowpart (V4SImode, op1),
+                                       gen_lowpart (V4SImode, op2)));
+      op0 = expand_binop (mode, add_optab, t5, t4, op0, 1, OPTAB_DIRECT);
+
     }
   else
     {
index 684eb7b669d9cc96a9871b6ba89226516f7eb2b8..b417245646adb1011534258cd737676de222d252 100644 (file)
@@ -1,3 +1,8 @@
+2014-06-16 Ganesh Gopalasubramanian  <Ganesh.Gopalasubramanian@amd.com>
+
+       * gcc.target/i386/xop-imul64-vector.c: Remove the check for
+       vpmacsdql instruction.
+
 2014-06-16  Yury Gribov  <y.gribov@samsung.com>
 
        * c-c++-common/asan/instrument-with-calls-1.c: New test.
index fbf605f31ec00715647f401ee5349a1652ef5b4c..fc8c8806f78c88c0a5f92f0150ab3874fd5ed87a 100644 (file)
@@ -33,4 +33,3 @@ int main ()
 
 /* { dg-final { scan-assembler "vpmulld" } } */
 /* { dg-final { scan-assembler "vphadddq" } } */
-/* { dg-final { scan-assembler "vpmacsdql" } } */