From patchwork Thu Nov 11 08:25:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 70784 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 EE5DEB7123 for ; Thu, 11 Nov 2010 19:26:08 +1100 (EST) Received: (qmail 13701 invoked by alias); 11 Nov 2010 08:26:06 -0000 Received: (qmail 13638 invoked by uid 22791); 11 Nov 2010 08:26:04 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, TW_AV, TW_CL, TW_FS, TW_MX, TW_TB, TW_ZJ, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-pz0-f47.google.com (HELO mail-pz0-f47.google.com) (209.85.210.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 11 Nov 2010 08:25:56 +0000 Received: by pzk34 with SMTP id 34so393212pzk.20 for ; Thu, 11 Nov 2010 00:25:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.142.199.19 with SMTP id w19mr260760wff.390.1289463955042; Thu, 11 Nov 2010 00:25:55 -0800 (PST) Received: by 10.143.161.2 with HTTP; Thu, 11 Nov 2010 00:25:54 -0800 (PST) Date: Thu, 11 Nov 2010 09:25:54 +0100 Message-ID: Subject: [PATCH, testsuite]: Enable some more x86 intrinsics tests From: Uros Bizjak To: 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! 2010-11-11 Uros Bizjak * gcc-target/i386/sse-12.c: Add -msse4a to dg-options. * gcc-target/i386/sse-13.c: Add -msse4a, -mfma4, -mbmi and -mtbm to dg-options. * gcc-target/i386/sse-14.c: Add -mfma4a and -mbmi to dg-options. * g++.dg/other/i386-2.C: Add -msse4a and -mfma4 to dg-options. * g++.dg/other/i386-3.C: Ditto. Tested on x86_64-pc-linux-gnu {,-m32}, committed to mainline SVN. Uros. Index: gcc.target/i386/sse-12.c =================================================================== --- gcc.target/i386/sse-12.c (revision 166594) +++ gcc.target/i386/sse-12.c (working copy) @@ -1,9 +1,9 @@ -/* Test that {,x,e,p,t,s,w,a,b,i}mmintrin.h, xopintrin.h, mm3dnow.h, - fma4intrin.h, abmintrin.h, bmiintrin.h, tbmintrin.h, lwpintrin.h, +/* Test that {,x,e,p,t,s,w,a,b,i}mmintrin.h, mm3dnow.h, fma4intrin.h, + xopintrin.h, abmintrin.h, bmiintrin.h, tbmintrin.h, lwpintrin.h, popcntintrin.h and mm_malloc.h are usable with -O -std=c89 -pedantic-errors. */ /* { dg-do compile } */ -/* { dg-options "-O -std=c89 -pedantic-errors -march=k8 -m3dnow -mavx -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mbmi -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c" } */ +/* { dg-options "-O -std=c89 -pedantic-errors -march=k8 -msse4a -m3dnow -mavx -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mbmi -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c" } */ #include Index: gcc.target/i386/sse-14.c =================================================================== --- gcc.target/i386/sse-14.c (revision 166594) +++ gcc.target/i386/sse-14.c (working copy) @@ -1,11 +1,13 @@ /* { dg-do compile } */ -/* { dg-options "-O0 -Werror-implicit-function-declaration -march=k8 -m3dnow -mavx -mxop -msse4a -maes -mpclmul -mpopcnt -mabm -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c" } */ +/* { dg-options "-O0 -Werror-implicit-function-declaration -march=k8 -msse4a -m3dnow -mavx -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mbmi -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c" } */ #include /* Test that the intrinsics compile without optimization. All of them are - defined as inline functions in {,x,e,p,t,s,w,a}mmintrin.h, xopintrin.h, - lwpintrin.h and mm3dnow.h that reference the proper builtin functions. + defined as inline functions in {,x,e,p,t,s,w,a,b,i}mmintrin.h, mm3dnow.h, + fma4intrin.h, xopintrin.h, abmintrin.h, bmiintrin.h, tbmintrin.h, + lwpintrin.h and mm_malloc.h that reference the proper builtin functions. + Defining away "extern" and "__inline" results in all of them being compiled as proper functions. */ Index: gcc.target/i386/sse-13.c =================================================================== --- gcc.target/i386/sse-13.c (revision 166594) +++ gcc.target/i386/sse-13.c (working copy) @@ -1,15 +1,17 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -Werror-implicit-function-declaration -march=k8 -m3dnow -mavx -mxop -maes -mpclmul -mpopcnt -mabm -mlwp -mfsgsbase -mrdrnd -mf16c" } */ +/* { dg-options "-O2 -Werror-implicit-function-declaration -march=k8 -msse4a -m3dnow -mavx -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mbmi -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c" } */ #include /* Test that the intrinsics compile with optimization. All of them are defined as inline functions in {,x,e,p,t,s,w,a,b,i}mmintrin.h, - xopintrin.h, abmintrin.h, tbmintrin.h, lwpintrin.h, popcntintrin.h - and mm3dnow.h that reference the proper builtin functions. Defining - away "extern" and "__inline" results in all of them being compiled as - proper functions. */ + mm3dnow.h, fma4intrin.h, xopintrin.h, abmintrin.h, bmiintrin.h, + tbmintrin.h, lwpintrin.h, popcntintrin.h and mm_malloc.h that + reference the proper builtin functions. + Defining away "extern" and "__inline" results in all of them being + compiled as proper functions. */ + #define extern #define __inline Index: g++.dg/other/i386-2.C =================================================================== --- g++.dg/other/i386-2.C (revision 166594) +++ g++.dg/other/i386-2.C (working copy) @@ -1,9 +1,9 @@ /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ -/* { dg-options "-O -pedantic-errors -march=k8 -m3dnow -mavx -mxop -maes -mpclmul -mpopcnt -mabm -mbmi -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c" } */ +/* { dg-options "-O -pedantic-errors -march=k8 -msse4a -m3dnow -mavx -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mbmi -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c" } */ -/* Test that {,x,e,p,t,s,w,a,b,i}mmintrin.h, xopintrin.h, abmintrin.h, - bmiintrin.h, tbmintrin.h, lwpintrin.h, popcntintrin.h and mm3dnow.h - are usable with -O -pedantic-errors. */ +/* Test that {,x,e,p,t,s,w,a,b,i}mmintrin.h, mm3dnow.h, fma4intrin.h, + xopintrin.h, abmintrin.h, bmiintrin.h, tbmintrin.h, lwpintrin.h, + popcntintrin.h and mm_malloc.h.h are usable with -O -pedantic-errors. */ #include Index: g++.dg/other/i386-3.C =================================================================== --- g++.dg/other/i386-3.C (revision 166594) +++ g++.dg/other/i386-3.C (working copy) @@ -1,8 +1,9 @@ /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ -/* { dg-options "-O -fkeep-inline-functions -march=k8 -m3dnow -mavx -mxop -maes -mpclmul -mpopcnt -mabm -mbmi -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c" } */ +/* { dg-options "-O -fkeep-inline-functions -march=k8 -msse4a -m3dnow -mavx -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mbmi -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c" } */ -/* Test that {,x,e,p,t,s,w,a,b,i}mmintrin.h, xopintrin.h, abmintrin.h, - bmiintrin.h, tbmintrin.h, lwpintrin.h, popcntintrin.h and mm3dnow.h - are usable with -O -fkeep-inline-functions. */ +/* Test that {,x,e,p,t,s,w,a,b,i}mmintrin.h, mm3dnow.h, fma4intrin.h, + xopintrin.h, abmintrin.h, bmiintrin.h, tbmintrin.h, lwpintrin.h, + popcntintrin.h and mm_malloc.h are usable with + -O -fkeep-inline-functions. */ #include