Patchwork fix vfmsubaddpd/vfmaddsubpd generation

login
register
mail settings
Submitter Quentin Neill
Date May 17, 2011, 9:17 p.m.
Message ID <BANLkTinvO66W8T2bEJiSXt2WCFhTjex=4Q@mail.gmail.com>
Download mbox | patch
Permalink /patch/96046/
State New
Headers show

Comments

Quentin Neill - May 17, 2011, 9:17 p.m.
This patch fixes an obvious problem: the fma4_fmsubadd/fma4_fmaddsub
instruction templates don't generate vfmsubaddpd/vfmaddsubpd because
they don't use <ssemodesuffix>

This passes bootstrap on x86_64 on trunk.  Okay to commit?

BTW, I'm testing on gcc-4_6-branch.  Should I post a different patch
thread, or just use this one?

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3625d9b..e86ea4e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@ 
+2011-05-17  Harsha Jagasia  <harsha.jagasia@amd.com>
+
+	* config/i386/sse.md (fma4_fmsubadd): Use <ssemodesuffix>.
+	(fma4_fmaddsub): Likewise
+
 2011-05-17  Richard Guenther  <rguenther@suse.de>
 
 	* gimple.c (iterative_hash_gimple_type): Simplify singleton
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 291bffb..7c4e6dd 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -1663,7 +1663,7 @@ 
 	   (match_operand:VF 3 "nonimmediate_operand" "xm,x")]
 	  UNSPEC_FMADDSUB))]
   "TARGET_FMA4"
-  "vfmaddsubps\t{%3, %2, %1, %0|%0, %1, %2, %3}"
+  "vfmaddsubp<ssemodesuffix>\t{%3, %2, %1, %0|%0, %1, %2, %3}"
   [(set_attr "type" "ssemuladd")
    (set_attr "mode" "<MODE>")])
 
@@ -1676,7 +1676,7 @@ 
 	     (match_operand:VF 3 "nonimmediate_operand" "xm,x"))]
 	  UNSPEC_FMADDSUB))]
   "TARGET_FMA4"
-  "vfmsubaddps\t{%3, %2, %1, %0|%0, %1, %2, %3}"
+  "vfmsubaddp<ssemodesuffix>\t{%3, %2, %1, %0|%0, %1, %2, %3}"
   [(set_attr "type" "ssemuladd")
    (set_attr "mode" "<MODE>")])