From patchwork Wed Mar 4 07:13:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kewen.Lin" X-Patchwork-Id: 1248853 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-520599-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=aZfOWGey; 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 48XQ9N3B2kz9sP7 for ; Wed, 4 Mar 2020 18:14:14 +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:date:mime-version:content-type :content-transfer-encoding:message-id; q=dns; s=default; b=B5WPz K1O2IZD+XlqW/cSApQiOfFo+vm7bUFw0CZhsnFBlZcR8rvT63ToR28Fv+GNtUXmK ld0uxmI9CgcFoBwoyA4P7Nq9Lr3Q2OONHGccY/k6+q6Dv8DjYBGms1F9lC5QVtr6 NbabwuOEZ4YvYIdtmHLuz5j28g6DpT/WhMZkcY= 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:date:mime-version:content-type :content-transfer-encoding:message-id; s=default; bh=mlw6VYjj8Er yew3ZD+E0zhpaxsE=; b=aZfOWGeyC9tX2rjJTK3CfE6PxBoYvpoIx6//wZAEbRV EQG4SUQFNsuK3A/hswQrQ71ibtnHqjRVrkf7Fd8WPQyqCbAGK4GEE4boel9jiRiX x/tlJXdJ3//8brrD5BTb5b5as74gFrdatru3h18+WCY3jWtwVXFR+N27q2ZsUmEA = Received: (qmail 124314 invoked by alias); 4 Mar 2020 07:14:07 -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 123558 invoked by uid 89); 4 Mar 2020 07:14:06 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy=differentiate X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 04 Mar 2020 07:14:05 +0000 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02479Ksj057518 for ; Wed, 4 Mar 2020 02:14:04 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2yhhy69422-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 04 Mar 2020 02:14:03 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 4 Mar 2020 07:14:01 -0000 Received: from b06avi18626390.portsmouth.uk.ibm.com (9.149.26.192) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 4 Mar 2020 07:13:58 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0247CxVs27132244 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 4 Mar 2020 07:12:59 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8229911C05E; Wed, 4 Mar 2020 07:13:57 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B18D711C058; Wed, 4 Mar 2020 07:13:55 +0000 (GMT) Received: from KewenLins-MacBook-Pro.local (unknown [9.200.43.39]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 4 Mar 2020 07:13:55 +0000 (GMT) To: GCC Patches Cc: Segher Boessenkool , Bill Schmidt , Richard Sandiford From: "Kewen.Lin" Subject: [testsuite] Fix PR94019 to allow one vector char when !vect_hw_misalign Date: Wed, 4 Mar 2020 15:13:51 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 x-cbid: 20030407-0008-0000-0000-00000359277D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20030407-0009-0000-0000-00004A7A591B Message-Id: <06fd34d8-8f90-0b62-8cf5-c58ee67e9ab3@linux.ibm.com> X-IsSubscribed: yes Hi, As PR94019 shows, without misaligned vector access support but with realign load, the vectorized loop will end up with realign scheme. It generates mask (control vector) with return type vector signed char which breaks the not check. The fix is to differentiate powerpc vect_hw_misalign and powerpc !vect_hw_misalign, permit one vector char occurance for powerpc !vect_hw_misalign and keep other targets same as before. Verified it on ppc64-redhat-linux (Power7 BE). Is it ok for trunk, and backport to GCC 9 after some burn-in time? BR, Kewen -------- gcc/testsuite/ChangeLog 2020-03-04 Kewen Lin PR testsuite/94019 * gcc.dg/vect/vect-over-widen-17.c: Expect one vector char if it's on POWER and without misaligned vector access support. -------- --- a/gcc/testsuite/gcc.dg/vect/vect-over-widen-17.c +++ b/gcc/testsuite/gcc.dg/vect/vect-over-widen-17.c @@ -41,6 +41,10 @@ main (void) } /* { dg-final { scan-tree-dump-not {vect_recog_over_widening_pattern: detected} "vect" } } */ -/* { dg-final { scan-tree-dump-not {vector[^\n]*char} "vect" } } */ +/* { dg-final { scan-tree-dump-not {vector[^\n]*char} "vect" { target { { ! powerpc*-*-* } || { powerpc*-*-* && vect_hw_misalign } } } } } +/* On Power, if there is no vect_hw_misalign support, unaligned vector access + adopts realign_load scheme. It requires rs6000_builtin_mask_for_load to + generate mask whose return type is vector char. */ +/* { dg-final { scan-tree-dump-times {vector[^\n]*char} 1 "vect" { target { powerpc*-*-* && { ! vect_hw_misalign } } } } } */ /* { dg-final { scan-tree-dump-not {vector[^ ]* int} "vect" } } */ /* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" } } */