From patchwork Fri Jun 22 14:32:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Carl Love X-Patchwork-Id: 933419 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-480298-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=us.ibm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Df1WRYFq"; 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 41C1JN6mjTz9s2L for ; Sat, 23 Jun 2018 00:33:07 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:from:to:cc:date:mime-version:message-id:content-type :content-transfer-encoding; q=dns; s=default; b=iWm7tiF+lgdJoqh+ hkU5UtyyapaLeE68MKB61wiX6dDLLZXQQpdYgfMQD/TqcGJ1bUg28PiHNS0SVOL5 pdrdbdGP15ZDjjHMsU1vDhYbERFCHcThzFh4/1xMOejfjET8OKx1Efgv0qbkVVmK ucvkMoPoTorCoeCd0EbruwJO5Xs= 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 :subject:from:to:cc:date:mime-version:message-id:content-type :content-transfer-encoding; s=default; bh=nAQBQWYHfCaYWKSNXbIF+G rupt8=; b=Df1WRYFqmVSEIkHiR7f32dKYdw4Gu8XDPNArvTFDK7OgZGQQ0rYgx1 CjYmJnMXFB35gA+DzAkC6fTGnJp6zUrS7x5R+ovNvasV+ukP14xBFasBEHrr8iPp wdlIAPOkuOFArjMmCH3vpVqVNrmP3IgokD92X4ioOzJP51w8tVYx8= Received: (qmail 22722 invoked by alias); 22 Jun 2018 14:33:00 -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 22701 invoked by uid 89); 22 Jun 2018 14:32:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-27.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:D*us.ibm.com, Hx-languages-length:2190, love, HContent-Transfer-Encoding:8bit 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; Fri, 22 Jun 2018 14:32:58 +0000 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w5METcue089106 for ; Fri, 22 Jun 2018 10:32:56 -0400 Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) by mx0b-001b2d01.pphosted.com with ESMTP id 2jryp0h2n0-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 22 Jun 2018 10:32:55 -0400 Received: from localhost by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 22 Jun 2018 08:32:52 -0600 Received: from b03cxnp08025.gho.boulder.ibm.com (9.17.130.17) by e32.co.us.ibm.com (192.168.1.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 22 Jun 2018 08:32:50 -0600 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w5MEWndG21692792 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 22 Jun 2018 07:32:49 -0700 Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9770513604F; Fri, 22 Jun 2018 08:32:49 -0600 (MDT) Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 98FE4136051; Fri, 22 Jun 2018 08:32:48 -0600 (MDT) Received: from oc3304648336.ibm.com (unknown [9.80.210.124]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 22 Jun 2018 08:32:48 -0600 (MDT) Subject: [PATCH, rs6000] Change word selector to prefered location for vec_insert builtin From: Carl Love To: Segher Boessenkool , gcc-patches@gcc.gnu.org, David Edelsohn Cc: Bill Schmidt , cel@us.ibm.com Date: Fri, 22 Jun 2018 07:32:47 -0700 Mime-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18062214-0004-0000-0000-00001458D116 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009239; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000265; SDB=6.01050707; UDB=6.00538488; IPR=6.00829677; MB=3.00021806; MTD=3.00000008; XFM=3.00000015; UTC=2018-06-22 14:32:51 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18062214-0005-0000-0000-000087D50289 Message-Id: <1529677967.7264.8.camel@us.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-06-22_03:, , signatures=0 X-IsSubscribed: yes GCC Maintainers: The following patch changes the word selected when extracting the word from the second vector to insert into the first vector by the vec_insert() builtin. Specifically, the test case vector float                                                                     fn2 (float a, vector float b)                                                    {                                                                                  return vec_insert (a, b, 1);                                                   }    without the patch generates the code sequence      xscvdpspn vs0,vs1      xxextractuw vs0,vs0,4      xxinsertw vs34,vs0,8 The xscvdpspn places the extracted word into words 0 and 1 of the destination. The xxextractuw extracts word 1 (offset of 4 bytes)from the source. The patch changes the offset so that the xxexractuw will extract word 0 (offset 0 bytes) instead of word 1. The values are the same so there is no functional change. But it was decided that using word 0 was preferred choice. Carl Love ----------------------------------------------------- gcc/ChangeLog: 2018-06-19 Carl Love * config/rs6000/vsx.md: Change word selector to prefered location. Signed-off-by: Carl Love --- gcc/config/rs6000/vsx.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md index a528ef2e8..6e7a4277f 100644 --- a/gcc/config/rs6000/vsx.md +++ b/gcc/config/rs6000/vsx.md @@ -3934,7 +3934,7 @@ operands[5] = gen_rtx_REG (V4SFmode, tmp_regno); operands[6] = gen_rtx_REG (V4SImode, tmp_regno); - operands[7] = GEN_INT (BYTES_BIG_ENDIAN ? 1 : 2); + operands[7] = GEN_INT (BYTES_BIG_ENDIAN ? 0 : 3); operands[8] = gen_rtx_REG (V4SImode, reg_or_subregno (operands[0])); } [(set_attr "type" "vecperm")