From patchwork Tue Aug 30 17:46:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 112373 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id BB07EB7296 for ; Wed, 31 Aug 2011 03:46:29 +1000 (EST) Received: (qmail 11568 invoked by alias); 30 Aug 2011 17:46:27 -0000 Received: (qmail 11553 invoked by uid 22791); 30 Aug 2011 17:46:26 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-gw0-f47.google.com (HELO mail-gw0-f47.google.com) (74.125.83.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 30 Aug 2011 17:46:11 +0000 Received: by gwb11 with SMTP id 11so5924581gwb.20 for ; Tue, 30 Aug 2011 10:46:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.147.4 with SMTP id u4mr231806wfd.161.1314726370431; Tue, 30 Aug 2011 10:46:10 -0700 (PDT) Received: by 10.143.13.8 with HTTP; Tue, 30 Aug 2011 10:46:10 -0700 (PDT) Date: Tue, 30 Aug 2011 19:46:10 +0200 Message-ID: Subject: [PATCH, i386]: Fix FMA fallout From: Uros Bizjak To: "H.J. Lu" Cc: Ilya Tocar , gcc-patches@gcc.gnu.org Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 * config/i386/i386.c (ix86_valid_target_attribute_inner_p): Handle FMA option. testsuite/ChangeLog: 2011-08-30 Uros Bizjak * gcc.target/i386/fma-compile.c: Escape [ and ] correctly. Tested on x86_64-pc-linux-gnu {,-m32}, committed to mainline. 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 } } */