From patchwork Thu Jan 9 19:44:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Bergner X-Patchwork-Id: 1220635 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-517038-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha1 header.s=default header.b=yAyJBlKa; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47txRz39M1z9sP6 for ; Fri, 10 Jan 2020 06:45:51 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=cHxZWV4GU34/im01 3NFbusGZ6DyVrwCZtD84TwC4AjfnMQ7U1PchQr/kbYUw+I7aC7dgojm/vUmOVbPC Unuj12aSniUjIz/0BzEbNzw9ipUolTzEq4e2YSHvSSIYBqneesW78GYGmNu4ujEr 7owfmDzkTJyJNGdcI3vs67I9PtU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type :content-transfer-encoding; s=default; bh=egrd5sHHRnFIPSkmv5JyiH CaxKw=; b=yAyJBlKalN00qxmRa/bxQxpORhKxcnkzagh/C+yd0gs8eRbGC3p+mF FnhOVuEIvvsCvZpxxh7QdFFQybsj/IuZM6ItYOkKZKola/Br7hPlnM3K5g1lXIPY Xfx9vBPm3W/qF90NWInm2qENrOFXqJndeaqZio3zvhyTYH8GgmM9w= Received: (qmail 62479 invoked by alias); 9 Jan 2020 19:45:41 -0000 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 Received: (qmail 62295 invoked by uid 89); 9 Jan 2020 19:45:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy=oring X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 09 Jan 2020 19:45:05 +0000 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 009JWI1Y067748; Thu, 9 Jan 2020 14:45:03 -0500 Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0b-001b2d01.pphosted.com with ESMTP id 2xe2vsu8v7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 09 Jan 2020 14:45:03 -0500 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 009JgXX9001237; Thu, 9 Jan 2020 19:45:02 GMT Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by ppma04wdc.us.ibm.com with ESMTP id 2xajb7gej3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 09 Jan 2020 19:45:02 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 009Jj1Lm43188686 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 9 Jan 2020 19:45:01 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5D6D16E04C; Thu, 9 Jan 2020 19:45:01 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B6D576E054; Thu, 9 Jan 2020 19:45:00 +0000 (GMT) Received: from [9.160.103.223] (unknown [9.160.103.223]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 9 Jan 2020 19:45:00 +0000 (GMT) To: GCC Patches Cc: Segher Boessenkool From: Peter Bergner Subject: [PATCH] rs6000: Fix PR93136, gcc.dg/vmx/ops.c and several other test break after r279772 Message-ID: Date: Thu, 9 Jan 2020 13:44:59 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 X-IsSubscribed: yes My fix to PR92923 seems to have caused the vmx/ops.c and vsx-vector-6.p*.c test failures. The ops.c issue is we need a new option to quiet a warning we didn't see when we were emitting VIEW_CONVERT_EXPRs. The other test cases just need a slight adjustment to some of their counts. However, we were seeing double/triple/... counting due to using "xxland" instead of {\mxxland\M} for our regex, so that was also counting xxlandc too. I adjusted all of the insn regexs to use \m and \M to fix that. I must say that the vsx-vector-6.p*.c tests are fragile! They're so big and reusing source operands, that the compiler can sometimes optimize several builtin calls together, meaning we don't see as many vsx instructions as we have calls to builtins. I didn't bother trying to fix that, since that is a lot more work! I just wanted to vent! :-) I've confirmed the updated test cases now pass on both BE and LE. Ok for trunk? Peter PR target/92923 PR target/93136 * gcc.dg/vmx/ops.c: Add -flax-vector-conversions to dg-options. * gcc.target/powerpc/vsx-vector-6.p7.c: Adjust scan-assembler-times regex directives. Adjust expected instruction counts. * gcc.target/powerpc/vsx-vector-6.p8.c: Likewise. * gcc.target/powerpc/vsx-vector-6.p9.c: Likewise. Index: gcc/testsuite/gcc.dg/vmx/ops.c =================================================================== --- gcc/testsuite/gcc.dg/vmx/ops.c (revision 279852) +++ gcc/testsuite/gcc.dg/vmx/ops.c (working copy) @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */ +/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated -flax-vector-conversions" } */ #include #include extern char * *var_char_ptr; Index: gcc/testsuite/gcc.target/powerpc/vsx-vector-6.p7.c =================================================================== --- gcc/testsuite/gcc.target/powerpc/vsx-vector-6.p7.c (revision 279852) +++ gcc/testsuite/gcc.target/powerpc/vsx-vector-6.p7.c (working copy) @@ -5,37 +5,38 @@ /* Expected instruction counts for Power 7 */ -/* { dg-final { scan-assembler-times "xvabsdp" 1 } } */ -/* { dg-final { scan-assembler-times "xvadddp" 1 } } */ -/* { dg-final { scan-assembler-times "xxlnor" 5 } } */ +/* { dg-final { scan-assembler-times {\mxvabsdp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvadddp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxxlnor\M} 5 } } */ /* { dg-final { scan-assembler-times {\mxvcmpeqdp\s} 1 } } */ /* { dg-final { scan-assembler-times {\mxvcmpeqdp\.\s} 5 } } */ /* { dg-final { scan-assembler-times {\mxvcmpgtdp\s} 2 } } */ /* { dg-final { scan-assembler-times {\mxvcmpgtdp\.\s} 5 } } */ /* { dg-final { scan-assembler-times {\mxvcmpgedp\s} 1 } } */ /* { dg-final { scan-assembler-times {\mxvcmpgedp\.\s} 6 } } */ -/* { dg-final { scan-assembler-times "xvrdpim" 1 } } */ -/* { dg-final { scan-assembler-times "xvmaddadp" 1 } } */ -/* { dg-final { scan-assembler-times "xvmsubadp" 1 } } */ -/* { dg-final { scan-assembler-times "xvsubdp" 1 } } */ -/* { dg-final { scan-assembler-times "xvmaxdp" 1 } } */ -/* { dg-final { scan-assembler-times "xvmindp" 1 } } */ -/* { dg-final { scan-assembler-times "xvmuldp" 1 } } */ -/* { dg-final { scan-assembler-times "vperm" 2 } } */ -/* { dg-final { scan-assembler-times "xvrdpic" 2 } } */ -/* { dg-final { scan-assembler-times "xvsqrtdp" 1 } } */ -/* { dg-final { scan-assembler-times "xvrdpiz" 1 } } */ -/* { dg-final { scan-assembler-times "xvmsubasp" 1 } } */ -/* { dg-final { scan-assembler-times "xvnmaddasp" 1 } } */ -/* { dg-final { scan-assembler-times "xvnmaddadp" 1 } } */ -/* { dg-final { scan-assembler-times "xvnmsubadp" 1 } } */ -/* { dg-final { scan-assembler-times "vmsumshs" 2 } } */ -/* { dg-final { scan-assembler-times "xxland" 13 } } */ -/* { dg-final { scan-assembler-times "xxlxor" 2 } } */ -/* { dg-final { scan-assembler-times "xxsel" 4 } } */ -/* { dg-final { scan-assembler-times "xvrdpip" 1 } } */ -/* { dg-final { scan-assembler-times "xvdivdp" 1 } } */ -/* { dg-final { scan-assembler-times "xvrdpi" 7 } } */ +/* { dg-final { scan-assembler-times {\mxvrdpim\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvmaddadp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvmsubadp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvsubdp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvmaxdp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvmindp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvmuldp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mvperm\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvrdpic\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvsqrtdp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvrdpiz\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvmsubasp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvnmaddasp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvnmaddadp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvnmsubadp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mvmsumshs\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxxland\M} 2 } } */ +/* { dg-final { scan-assembler-times {\mxxlandc\M} 12 } } */ +/* { dg-final { scan-assembler-times {\mxxlxor\M} 3 } } */ +/* { dg-final { scan-assembler-times {\mxxsel\M} 2 } } */ +/* { dg-final { scan-assembler-times {\mxvrdpip\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvdivdp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvrdpi\M} 1 } } */ /* Source code for the test in vsx-vector-6.h */ #include "vsx-vector-6.h" Index: gcc/testsuite/gcc.target/powerpc/vsx-vector-6.p8.c =================================================================== --- gcc/testsuite/gcc.target/powerpc/vsx-vector-6.p8.c (revision 279852) +++ gcc/testsuite/gcc.target/powerpc/vsx-vector-6.p8.c (working copy) @@ -5,45 +5,49 @@ /* Expected instruction counts for Power 8. */ -/* { dg-final { scan-assembler-times "xvabsdp" 1 } } */ -/* { dg-final { scan-assembler-times "xvadddp" 1 } } */ -/* { dg-final { scan-assembler-times "xxlnor" 6 { target le } } } */ -/* { dg-final { scan-assembler-times "xxlnor" 5 { target be } } } */ +/* { dg-final { scan-assembler-times {\mxvabsdp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvadddp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxxlnor\M} 6 { target le } } } */ +/* { dg-final { scan-assembler-times {\mxxlnor\M} 5 { target be } } } */ /* We generate xxlor instructions for many reasons other than or'ing vector operands or calling __builtin_vec_or(), which means we cannot rely on their usage counts being stable. Therefore, we just ensure at least one xxlor instruction was generated. */ -/* { dg-final { scan-assembler "xxlor" } } */ +/* { dg-final { scan-assembler {\mxxlor\M} } } */ -/* { dg-final { scan-assembler-times {\mxvcmpeqdp\s} 1 } } */ -/* { dg-final { scan-assembler-times {\mxvcmpeqdp\.\s} 5 } } */ +/* { dg-final { scan-assembler-not {\mxvcmpeqdp\s} { target le } } } */ +/* { dg-final { scan-assembler-times {\mxvcmpeqdp\s} 1 { target be } } } */ +/* { dg-final { scan-assembler-times {\mxvcmpeqdp\.\s} 5 { target le } } } */ +/* { dg-final { scan-assembler-times {\mxvcmpeqdp\.\s} 6 { target be } } } */ /* { dg-final { scan-assembler-times {\mxvcmpgtdp\s} 2 } } */ -/* { dg-final { scan-assembler-times {\mxvcmpgtdp\.\s} 6 } } */ +/* { dg-final { scan-assembler-times {\mxvcmpgtdp\.\s} 6 { target le } } } */ +/* { dg-final { scan-assembler-times {\mxvcmpgtdp\.\s} 5 { target be } } } */ /* { dg-final { scan-assembler-times {\mxvcmpgedp\s} 2 } } */ /* { dg-final { scan-assembler-times {\mxvcmpgedp\.\s} 4 } } */ -/* { dg-final { scan-assembler-times "xvrdpim" 1 } } */ -/* { dg-final { scan-assembler-times "xvmaddadp" 1 } } */ -/* { dg-final { scan-assembler-times "xvmsubadp" 1 } } */ -/* { dg-final { scan-assembler-times "xvsubdp" 1 } } */ -/* { dg-final { scan-assembler-times "xvmaxdp" 1 } } */ -/* { dg-final { scan-assembler-times "xvmindp" 1 } } */ -/* { dg-final { scan-assembler-times "xvmuldp" 1 } } */ -/* { dg-final { scan-assembler-times "vperm" 1 } } */ -/* { dg-final { scan-assembler-times "xvrdpic" 1 } } */ -/* { dg-final { scan-assembler-times "xvsqrtdp" 1 } } */ -/* { dg-final { scan-assembler-times "xvrdpiz" 1 } } */ -/* { dg-final { scan-assembler-times "xvmsubasp" 1 } } */ -/* { dg-final { scan-assembler-times "xvnmaddasp" 1 } } */ -/* { dg-final { scan-assembler-times "xvnmaddadp" 1 } } */ -/* { dg-final { scan-assembler-times "xvnmsubadp" 1 } } */ -/* { dg-final { scan-assembler-times "vmsumshs" 1 } } */ -/* { dg-final { scan-assembler-times "xxland" 13 } } */ -/* { dg-final { scan-assembler-times "xxlxor" 2 } } */ -/* { dg-final { scan-assembler-times "xxsel" 2 } } */ -/* { dg-final { scan-assembler-times "xvrdpip" 1 } } */ -/* { dg-final { scan-assembler-times "xvdivdp" 1 } } */ -/* { dg-final { scan-assembler-times "xvrdpi" 5 } } */ +/* { dg-final { scan-assembler-times {\mxvrdpim\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvmaddadp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvmsubadp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvsubdp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvmaxdp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvmindp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvmuldp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mvperm\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvrdpic\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvsqrtdp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvrdpiz\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvmsubasp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvnmaddasp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvnmaddadp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvnmsubadp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mvmsumshs\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxxland\M} 2 } } */ +/* { dg-final { scan-assembler-times {\mxxlandc\M} 12 } } */ +/* { dg-final { scan-assembler-times {\mxxlxor\M} 3 } } */ +/* { dg-final { scan-assembler-times {\mxxsel\M} 2 } } */ +/* { dg-final { scan-assembler-times {\mxvrdpip\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvdivdp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvrdpi\M} 1 } } */ /* Source code for the test in vsx-vector-6.h */ #include "vsx-vector-6.h" Index: gcc/testsuite/gcc.target/powerpc/vsx-vector-6.p9.c =================================================================== --- gcc/testsuite/gcc.target/powerpc/vsx-vector-6.p9.c (revision 279852) +++ gcc/testsuite/gcc.target/powerpc/vsx-vector-6.p9.c (working copy) @@ -13,26 +13,27 @@ operands or calling __builtin_vec_or(), which means we cannot rely on their usage counts being stable. Therefore, we just ensure at least one xxlor instruction was generated. */ -/* { dg-final { scan-assembler "xxlor" } } */ +/* { dg-final { scan-assembler {\mxxlor\M} } } */ -/* { dg-final { scan-assembler-times "xvcmpeqdp" 5 } } */ -/* { dg-final { scan-assembler-times "xvcmpgtdp" 8 } } */ -/* { dg-final { scan-assembler-times "xvcmpgedp" 8 } } */ -/* { dg-final { scan-assembler-times "xvrdpim" 1 } } */ -/* { dg-final { scan-assembler-times "xvmaddadp" 1 } } */ -/* { dg-final { scan-assembler-times "xvmsubadp" 1 } } */ -/* { dg-final { scan-assembler-times "xvsubdp" 1 } } */ -/* { dg-final { scan-assembler-times "xvmaxdp" 1 } } */ -/* { dg-final { scan-assembler-times "xvmindp" 1 } } */ -/* { dg-final { scan-assembler-times "xvmuldp" 1 } } */ -/* { dg-final { scan-assembler-times "vperm" 1 } } */ -/* { dg-final { scan-assembler-times "xvrdpic" 1 } } */ -/* { dg-final { scan-assembler-times "xvsqrtdp" 1 } } */ -/* { dg-final { scan-assembler-times "xvrdpiz" 1 } } */ -/* { dg-final { scan-assembler-times "xvmsubasp" 1 } } */ -/* { dg-final { scan-assembler-times "xvnmaddasp" 1 } } */ -/* { dg-final { scan-assembler-times "vmsumshs" 1 } } */ -/* { dg-final { scan-assembler-times "xxland" 13 } } */ +/* { dg-final { scan-assembler-times {\mxvcmpeqdp\M} 5 } } */ +/* { dg-final { scan-assembler-times {\mxvcmpgtdp\M} 8 } } */ +/* { dg-final { scan-assembler-times {\mxvcmpgedp\M} 8 } } */ +/* { dg-final { scan-assembler-times {\mxvrdpim\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvmaddadp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvmsubadp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvsubdp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvmaxdp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvmindp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvmuldp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mvperm[r]*\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvrdpic\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvsqrtdp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvrdpiz\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvmsubasp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxvnmaddasp\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mvmsumshs\M} 1 } } */ +/* { dg-final { scan-assembler-times {\mxxland\M} 2 } } */ +/* { dg-final { scan-assembler-times {\mxxlandc\M} 12 } } */ /* Source code for the test in vsx-vector-6.h */ #include "vsx-vector-6.h"