From patchwork Mon Dec 11 21:55:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Schmidt X-Patchwork-Id: 847253 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-468953-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="dd/GEXnu"; 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 3ywcG54Pn3z9sxR for ; Tue, 12 Dec 2017 08:55:40 +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=AStIU e8CKJDCPumroTojcwC/WwszjhblGXKclktlP0nkKMaL3PlN7f4mmFIPqNQz0nGaj 89dKUrXVYqN2tOUnGahDRQ9QP7kDQnNIhexbs3m4nVl96u3U+C3lW/Zx4OX7iZUy yNdRlwJx0FpkCNl6xHxol+xg42HvKib3RILvR4= 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=Ozwr9/5pEKJ gLDefY7xxAVRets8=; b=dd/GEXnuoQDzIN33xzmRlpH1bXIOz1hx6sZmZF4lHZ3 rJxcD1VMgiEg2k/AfhcW/C1I/R5SDbpdyt98aSxE9zVVMYNu3HnJEVrcCd82X54p kr5YgKmoACewMWIKgfb7f7y6pom8WCNctXJDampvG9EURE6AxVRZSlImkhscH6kA = Received: (qmail 29371 invoked by alias); 11 Dec 2017 21:55:30 -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 29359 invoked by uid 89); 11 Dec 2017 21:55:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=sk:compari 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; Mon, 11 Dec 2017 21:55:26 +0000 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vBBLottE072417 for ; Mon, 11 Dec 2017 16:55:25 -0500 Received: from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154]) by mx0a-001b2d01.pphosted.com with ESMTP id 2et1m89x44-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 11 Dec 2017 16:55:24 -0500 Received: from localhost by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 11 Dec 2017 14:55:24 -0700 Received: from b03cxnp08026.gho.boulder.ibm.com (9.17.130.18) by e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 11 Dec 2017 14:55:21 -0700 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vBBLtLQ560948578; Mon, 11 Dec 2017 14:55:21 -0700 Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 575396E03A; Mon, 11 Dec 2017 14:55:21 -0700 (MST) Received: from bigmac.rchland.ibm.com (unknown [9.10.86.28]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP id 1F3F86E03D; Mon, 11 Dec 2017 14:55:21 -0700 (MST) To: GCC Patches Cc: Segher Boessenkool , David Edelsohn From: Bill Schmidt Subject: [PATCH, rs6000] Fix PR83332 (missing vcond patterns) Date: Mon, 11 Dec 2017 15:55:20 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 17121121-0020-0000-0000-00000D262790 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008190; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000244; SDB=6.00958830; UDB=6.00484860; IPR=6.00738853; BA=6.00005736; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00018489; XFM=3.00000015; UTC=2017-12-11 21:55:23 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17121121-0021-0000-0000-00005F426298 Message-Id: <184e4c3d-02f9-6623-bf0e-451852e7d47b@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-12-11_10:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1712110311 X-IsSubscribed: yes Hi, A new test case introduced for PR81303 failed on powerpc64 (BE, LE). This turns out to be due to a missing standard pattern (vcondv2div2df). This and a couple of other patterns are easy to support with existing logic by just adding new patterns with appropriate modes. That's all this patch does. That's sufficient to cause the failing test to pass. Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this okay for trunk? Thanks, Bill 2017-12-11 Bill Schmidt PR target/83332 * config/rs6000/vector.md (vcondv2dfv2di): New define_expand. (vcondv2div2df): Likewise. (vconduv2dfv2di): Likewise. Index: gcc/config/rs6000/vector.md =================================================================== --- gcc/config/rs6000/vector.md (revision 255539) +++ gcc/config/rs6000/vector.md (working copy) @@ -455,6 +455,44 @@ FAIL; }") +(define_expand "vcondv2dfv2di" + [(set (match_operand:V2DF 0 "vfloat_operand" "") + (if_then_else:V2DF + (match_operator 3 "comparison_operator" + [(match_operand:V2DI 4 "vint_operand" "") + (match_operand:V2DI 5 "vint_operand" "")]) + (match_operand:V2DF 1 "vfloat_operand" "") + (match_operand:V2DF 2 "vfloat_operand" "")))] + "VECTOR_UNIT_ALTIVEC_OR_VSX_P (V2DFmode) + && VECTOR_UNIT_ALTIVEC_OR_VSX_P (V2DImode)" + " +{ + if (rs6000_emit_vector_cond_expr (operands[0], operands[1], operands[2], + operands[3], operands[4], operands[5])) + DONE; + else + FAIL; +}") + +(define_expand "vcondv2div2df" + [(set (match_operand:V2DI 0 "vint_operand" "") + (if_then_else:V2DI + (match_operator 3 "comparison_operator" + [(match_operand:V2DF 4 "vfloat_operand" "") + (match_operand:V2DF 5 "vfloat_operand" "")]) + (match_operand:V2DI 1 "vint_operand" "") + (match_operand:V2DI 2 "vint_operand" "")))] + "VECTOR_UNIT_ALTIVEC_OR_VSX_P (V2DFmode) + && VECTOR_UNIT_ALTIVEC_OR_VSX_P (V2DImode)" + " +{ + if (rs6000_emit_vector_cond_expr (operands[0], operands[1], operands[2], + operands[3], operands[4], operands[5])) + DONE; + else + FAIL; +}") + (define_expand "vcondu" [(set (match_operand:VEC_I 0 "vint_operand") (if_then_else:VEC_I @@ -492,6 +530,25 @@ FAIL; }") +(define_expand "vconduv2dfv2di" + [(set (match_operand:V2DF 0 "vfloat_operand" "") + (if_then_else:V2DF + (match_operator 3 "comparison_operator" + [(match_operand:V2DI 4 "vint_operand" "") + (match_operand:V2DI 5 "vint_operand" "")]) + (match_operand:V2DF 1 "vfloat_operand" "") + (match_operand:V2DF 2 "vfloat_operand" "")))] + "VECTOR_UNIT_ALTIVEC_OR_VSX_P (V2DFmode) + && VECTOR_UNIT_ALTIVEC_OR_VSX_P (V2DImode)" + " +{ + if (rs6000_emit_vector_cond_expr (operands[0], operands[1], operands[2], + operands[3], operands[4], operands[5])) + DONE; + else + FAIL; +}") + (define_expand "vector_eq" [(set (match_operand:VEC_C 0 "vlogical_operand" "") (eq:VEC_C (match_operand:VEC_C 1 "vlogical_operand" "")