From patchwork Thu Jan 28 22:41:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Schmidt X-Patchwork-Id: 574948 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5E267140BF7 for ; Fri, 29 Jan 2016 09:41:36 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Kdg1Uzmf; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:from:to:cc:date:content-type:mime-version :content-transfer-encoding; q=dns; s=default; b=cjsHDagYv+CbGEwv dg3Fvs+QncK+pCFOift+sjiWVzBzFSnv8vc21fw6n0VWUNG6AHTBuERftp5AKB2N TY8ZfxNR9mWU7lTWuJxXpo+x9WBDIN+leLpXqKEHftWbZP4yR6hgYlAz94jOLA2a mQxVxs/aIEw5nrJd3b8mzBLcT5k= 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 :message-id:subject:from:to:cc:date:content-type:mime-version :content-transfer-encoding; s=default; bh=bRS44B3n2gtAe3sdylnVHN 2FeqA=; b=Kdg1UzmfVKDjjXs9mVSGc8t6mAMPeMR6hg4eYNCH9UQ7mtzpmvnVfa BUPgXXqxjcYH1Yu89vEytXzIarjEaC2rMqS/avv8xKFq9f+o7zjvAwIb1JwgOVuE stMUrLDnh9127Ou5eitEoTJXfpOU0KxWVoi+jO4A1Dz57VhaOPgg4= Received: (qmail 106420 invoked by alias); 28 Jan 2016 22:41:29 -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 106376 invoked by uid 89); 28 Jan 2016 22:41:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=main1, 465, pr65546, PR65546 X-HELO: e35.co.us.ibm.com Received: from e35.co.us.ibm.com (HELO e35.co.us.ibm.com) (32.97.110.153) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Thu, 28 Jan 2016 22:41:26 +0000 Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 28 Jan 2016 15:41:25 -0700 Received: from d03dlp02.boulder.ibm.com (9.17.202.178) by e35.co.us.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 28 Jan 2016 15:41:10 -0700 X-IBM-Helo: d03dlp02.boulder.ibm.com X-IBM-MailFrom: wschmidt@linux.vnet.ibm.com X-IBM-RcptTo: gcc-patches@gcc.gnu.org Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 6AF3F3E40030 for ; Thu, 28 Jan 2016 15:41:09 -0700 (MST) Received: from d01av05.pok.ibm.com (d01av05.pok.ibm.com [9.56.224.195]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u0SMf8ub28770412 for ; Thu, 28 Jan 2016 22:41:09 GMT Received: from d01av05.pok.ibm.com (localhost [127.0.0.1]) by d01av05.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u0SMa7mo013405 for ; Thu, 28 Jan 2016 17:36:07 -0500 Received: from [9.48.100.47] (sig-9-48-100-47.ibm.com [9.48.100.47]) by d01av05.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u0SMa6R5013394; Thu, 28 Jan 2016 17:36:06 -0500 Message-ID: <1454020867.1194.34.camel@gnopaine> Subject: [PATCH, rs6000] Fix PR65546 From: Bill Schmidt To: gcc-patches@gcc.gnu.org Cc: dje.gcc@gmail.com Date: Thu, 28 Jan 2016 16:41:07 -0600 Mime-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16012822-0013-0000-0000-00001C525093 X-IsSubscribed: yes Hi, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65546 identifies a failure in gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c. The test case hasn't kept up with changes in the vectorizer, so it's looking for the wrong error message. Also, the error message should be conditioned by a check for support of unaligned memory accesses. This patch corrects these problems. For 4.9 and 5, the error message needs to be similarly changed. However, for these earlier releases, the check for misalignment support doesn't apply. Verified on powerpc64le-unknown-linux-gnu for both -mcpu=power7 and -mcpu=power8, which differ in their support for misalignment. Is this ok for trunk? Provided verification succeeds on 4.9 and 5, is the revised test ok for those releases? Thanks, Bill 2016-01-28 Bill Schmidt PR target/65546 * gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c: Correct condition being checked, and disable it when the target supports misaligned loads and stores. Index: gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c =================================================================== --- gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c (revision 232890) +++ gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c (working copy) @@ -46,5 +46,5 @@ int main (void) return main1 (); } -/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "not vectorized: unsupported unaligned store" 1 "vect" { target { ! vect_hw_misalign } } } } */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vect_hw_misalign } } } } */