From patchwork Thu Aug 22 13:45:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Leoshkevich X-Patchwork-Id: 1151614 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-507518-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.b="dKzAbI6b"; 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 46Dm713Qggz9s00 for ; Thu, 22 Aug 2019 23:47:25 +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:from :to:cc:subject:date:in-reply-to:references:mime-version :content-transfer-encoding:message-id; q=dns; s=default; b=ZTn9/ AXhoVpwzLkegsVZUxKGxLvGIhM948Y5FfIhNK8WyabaOfU2nY2duQAc9KmgjCmPU k8UQnCyIw9XtmgV5a6Rv/0kBI5FGo+ea84lKMVgqr5X/O0gbmsDrM178y45nOAcA jOobZZvrwkI6qtF3Mo8JVD6Tc5Pp1iLjqMB5os= 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:from :to:cc:subject:date:in-reply-to:references:mime-version :content-transfer-encoding:message-id; s=default; bh=fdHP6Jdjrvv Fowg2AcKe7sicpiw=; b=dKzAbI6brZvNJ1EUBl70yB1xlvRZZYFLfqSAAC7M+PP 1FG6ozFy+EC+F9LGkQzDV6zKxE8uKWwP20xAGoVto/5uMKJ+PkbFdQNj7IOiQxeZ JmJvGu1SD8Bk05rNpbmtyFYgY/Sxevxj9446AfqTyeZoxwRwtl9//Zg6lIZJ+A5Q = Received: (qmail 80643 invoked by alias); 22 Aug 2019 13:47:18 -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 80476 invoked by uid 89); 22 Aug 2019 13:47:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy= 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, 22 Aug 2019 13:47:16 +0000 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x7MDYsDC093677 for ; Thu, 22 Aug 2019 09:47:14 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 2uhsf2f88a-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 22 Aug 2019 09:47:14 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 22 Aug 2019 14:47:12 +0100 Received: from b06avi18878370.portsmouth.uk.ibm.com (9.149.26.194) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 22 Aug 2019 14:47:09 +0100 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x7MDl8X445023516 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 22 Aug 2019 13:47:09 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D37834204F; Thu, 22 Aug 2019 13:47:08 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ADE114204C; Thu, 22 Aug 2019 13:47:08 +0000 (GMT) Received: from white.boeblingen.de.ibm.com (unknown [9.152.99.241]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 22 Aug 2019 13:47:08 +0000 (GMT) From: Ilya Leoshkevich To: gcc-patches@gcc.gnu.org Cc: richard.sandiford@arm.com, segher@kernel.crashing.org, Ilya Leoshkevich Subject: [PATCH v2 4/9] S/390: Do not use signaling vector comparisons on z13 Date: Thu, 22 Aug 2019 15:45:46 +0200 In-Reply-To: <20190822134551.18924-1-iii@linux.ibm.com> References: <20190822134551.18924-1-iii@linux.ibm.com> MIME-Version: 1.0 x-cbid: 19082213-0012-0000-0000-000003418423 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19082213-0013-0000-0000-0000217BAF7E Message-Id: <20190822134551.18924-5-iii@linux.ibm.com> X-IsSubscribed: yes z13 supports only non-signaling vector comparisons. This means we cannot vectorize LT, LE, GT, GE and LTGT when compiling for z13. Notify middle-end about this using more restrictive operator predicate in vcond. gcc/ChangeLog: 2019-08-21 Ilya Leoshkevich * config/s390/vector.md (vcond_comparison_operator): New predicate. (vcond): Use vcond_comparison_operator. --- gcc/config/s390/vector.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/gcc/config/s390/vector.md b/gcc/config/s390/vector.md index 0702e1de835..d7a266c5605 100644 --- a/gcc/config/s390/vector.md +++ b/gcc/config/s390/vector.md @@ -614,10 +614,30 @@ operands[2] = GEN_INT (GET_MODE_NUNITS (mode) - 1); }) +(define_predicate "vcond_comparison_operator" + (match_operand 0 "comparison_operator") +{ + if (!HONOR_NANS (GET_MODE (XEXP (op, 0))) + && !HONOR_NANS (GET_MODE (XEXP (op, 1)))) + return true; + switch (GET_CODE (op)) + { + case LE: + case LT: + case GE: + case GT: + case LTGT: + /* Signaling vector comparisons are supported only on z14+. */ + return TARGET_Z14; + default: + return true; + } +}) + (define_expand "vcond" [(set (match_operand:V_HW 0 "register_operand" "") (if_then_else:V_HW - (match_operator 3 "comparison_operator" + (match_operator 3 "vcond_comparison_operator" [(match_operand:V_HW2 4 "register_operand" "") (match_operand:V_HW2 5 "nonmemory_operand" "")]) (match_operand:V_HW 1 "nonmemory_operand" "")