i386: Use vpmacsdd for mulv4si3
authorRichard Henderson <rth@redhat.com>
Mon, 25 Jun 2012 20:41:51 +0000 (13:41 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 25 Jun 2012 20:41:51 +0000 (13:41 -0700)
From-SVN: r188958

gcc/ChangeLog
gcc/config/i386/sse.md

index 673275ab7ff96ae9deb3b8f33e35dfeb503009ab..068d1500b84570f93b3032955acb41be56e5cda0 100644 (file)
@@ -1,3 +1,7 @@
+2012-06-25  Richard Henderson  <rth@redhat.com>
+
+       * config/i386.sse.md (mul<VI4_AVX2>3): Use xop_pmacsdd.
+
 2012-06-25  Richard Henderson  <rth@redhat.com>
 
        * config/i386/i386.c (ix86_rtx_costs) [MULT]: Only apply XOP cost
index 4c125815f066d2e293990a06ba8c88b8fca43f99..93cd9d7ee6bbf544e825d122477b3f62d3e38521 100644 (file)
        operands[2] = force_const_mem (<MODE>mode, operands[2]);
       ix86_fixup_binary_operands_no_copy (MULT, <MODE>mode, operands);
     }
+  else if (TARGET_XOP)
+    {
+      rtx z = force_reg (<MODE>mode, CONST0_RTX (<MODE>mode));
+      emit_insn (gen_xop_pmacsdd (operands[0], operands[1], operands[2], z));
+      DONE;
+    }
   else
     {
       ix86_expand_sse2_mulv4si3 (operands[0], operands[1], operands[2]);