diff mbox

[i386] : Fix FMA fallout

Message ID CAFULd4Y82LURms4re8D3wg4L8dZmsBdbDCLdFEXA_0=O5LvYfg@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak Aug. 30, 2011, 5:46 p.m. UTC
Hello!

The gcc.target/i386/fma-compile.c test did not escape [ and ]
correctly.  Unfortunately, this problem terminated dejagnu testing
early, hiding the problem with -mfma target attribute handling.

Attached patch fixes both problems.

2011-08-30  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.c (ix86_valid_target_attribute_inner_p):
	Handle FMA option.

testsuite/ChangeLog:

2011-08-30  Uros Bizjak  <ubizjak@gmail.com>

	* gcc.target/i386/fma-compile.c: Escape [ and ] correctly.

Tested on x86_64-pc-linux-gnu {,-m32}, committed to mainline.

Comments

H.J. Lu Aug. 30, 2011, 5:49 p.m. UTC | #1
On Tue, Aug 30, 2011 at 10:46 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> Hello!
>
> The gcc.target/i386/fma-compile.c test did not escape [ and ]
> correctly.  Unfortunately, this problem terminated dejagnu testing
> early, hiding the problem with -mfma target attribute handling.
>
> Attached patch fixes both problems.
>
> 2011-08-30  Uros Bizjak  <ubizjak@gmail.com>
>
>        * config/i386/i386.c (ix86_valid_target_attribute_inner_p):
>        Handle FMA option.
>
> testsuite/ChangeLog:
>
> 2011-08-30  Uros Bizjak  <ubizjak@gmail.com>
>
>        * gcc.target/i386/fma-compile.c: Escape [ and ] correctly.
>
> Tested on x86_64-pc-linux-gnu {,-m32}, committed to mainline.
>

It is

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50240

Thanks.
diff mbox

Patch

Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c	(revision 178319)
+++ config/i386/i386.c	(working copy)
@@ -4076,6 +4076,7 @@  ix86_valid_target_attribute_inner_p (tree args, ch
     IX86_ATTR_ISA ("sse4a",	OPT_msse4a),
     IX86_ATTR_ISA ("ssse3",	OPT_mssse3),
     IX86_ATTR_ISA ("fma4",	OPT_mfma4),
+    IX86_ATTR_ISA ("fma",	OPT_mfma),
     IX86_ATTR_ISA ("xop",	OPT_mxop),
     IX86_ATTR_ISA ("lwp",	OPT_mlwp),
     IX86_ATTR_ISA ("fsgsbase",	OPT_mfsgsbase),
Index: testsuite/gcc.target/i386/fma-compile.c
===================================================================
--- testsuite/gcc.target/i386/fma-compile.c	(revision 178319)
+++ testsuite/gcc.target/i386/fma-compile.c	(working copy)
@@ -199,23 +199,23 @@  check_mm256_fmsubadd_ps (__m256 a, __m256 b, __m25
 }
 
 
-/* { dg-final { scan-assembler-times "vfmadd[^s]..ps" 2 } } */
-/* { dg-final { scan-assembler-times "vfmsub[^s]..ps" 2 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[^s\]..ps" 2 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[^s\]..ps" 2 } } */
 /* { dg-final { scan-assembler-times "vfnmadd...ps" 2 } } */
 /* { dg-final { scan-assembler-times "vfnmsub...ps" 2 } } */
 /* { dg-final { scan-assembler-times "vfmaddsub...ps" 2 } } */
 /* { dg-final { scan-assembler-times "vfmsubadd...ps" 2 } } */
-/* { dg-final { scan-assembler-times "vfmadd[^s]..pd" 2 } } */
-/* { dg-final { scan-assembler-times "vfmsub[^s]..pd" 2 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[^s\]..pd" 2 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[^s\]..pd" 2 } } */
 /* { dg-final { scan-assembler-times "vfnmadd...pd" 2 } } */
 /* { dg-final { scan-assembler-times "vfnmsub...pd" 2 } } */
 /* { dg-final { scan-assembler-times "vfmaddsub...pd" 2 } } */
 /* { dg-final { scan-assembler-times "vfmsubadd...pd" 2 } } */
-/* { dg-final { scan-assembler-times "vfmadd[^s]..ss" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsub[^s]..ss" 1 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[^s\]..ss" 1 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[^s\]..ss" 1 } } */
 /* { dg-final { scan-assembler-times "vfnmadd...ss" 1 } } */
 /* { dg-final { scan-assembler-times "vfnmsub...ss" 1 } } */
-/* { dg-final { scan-assembler-times "vfmadd[^s]..sd" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsub[^s]..sd" 1 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[^s\]..sd" 1 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[^s\]..sd" 1 } } */
 /* { dg-final { scan-assembler-times "vfnmadd...sd" 1 } } */
 /* { dg-final { scan-assembler-times "vfnmsub...sd" 1 } } */