From patchwork Sat Nov 16 23:29:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Segher Boessenkool X-Patchwork-Id: 1196225 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-513810-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="LD7Smtcj"; 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 47FrzC6VCHz9sPK for ; Sun, 17 Nov 2019 10:29:41 +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:from :to:cc:subject:date:message-id; q=dns; s=default; b=PjtUmaGqXDtf Wt5NUa7hNoN7vCn0JwcbbSDMJQ2E5eaafIKD3GMviPtwhu8ArLfw5RLgJmM/3n8K 3Leb9wSIIS8S+Slb4hRemNh+6Rk9waWKXsQq/ay/DQIAgNwssQVuUOSdvfldi1wP sEKoRPR8v7S7ZBcK1R9WoG2jtcFMfuY= 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:message-id; s=default; bh=xHFLGhsyYVEKxpGh0k Q8DfbV944=; b=LD7SmtcjR52K/mCNv0DSaLK1FAKHIXhbiXL7XjzCp4vyUCv3JR QS/1jXVo93V4D3l8NPbgCS3rgKZuKzyRtqsQJvSBbPr1DSXAbNLZCmv4QWz1qveo D3TiF+56jsaKQN5qyW4oxh7JvgaCuFxK1VSlWIIA8heITpGMr3G5NwqGw= Received: (qmail 110860 invoked by alias); 16 Nov 2019 23:29:34 -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 110852 invoked by uid 89); 16 Nov 2019 23:29:34 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=UD:rs6000.md, rs6000md, rs6000.md, define_split X-HELO: gcc1-power7.osuosl.org Received: from gcc1-power7.osuosl.org (HELO gcc1-power7.osuosl.org) (140.211.15.137) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 16 Nov 2019 23:29:33 +0000 Received: by gcc1-power7.osuosl.org (Postfix, from userid 10019) id 7510012408C8; Sat, 16 Nov 2019 23:29:31 +0000 (UTC) From: Segher Boessenkool To: gcc-patches@gcc.gnu.org Cc: dje.gcc@gmail.com, Segher Boessenkool Subject: [PATCH] rs6000: Allow mode GPR in cceq_{ior,rev}_compare Date: Sat, 16 Nov 2019 23:29:29 +0000 Message-Id: <6d2d1982f25ceb1f4e4facea823c4dae4ae1999a.1573946629.git.segher@kernel.crashing.org> X-IsSubscribed: yes Also make it a parmeterized name: @cceq_{ior,rev}_compare_. Committing to trunk. Segher 2019-11-16 Segher Boessenkool * config/rs6000/rs6000.md (cceq_ior_compare): Rename to... (@cceq_ior_compare_ for GPR): ... this. Allow GPR instead of just SI. (cceq_rev_compare): Rename to... (@cceq_rev_compare_ for GPR): ... this. Allow GPR instead of just SI. (define_split for tf_): Add SImode first argument to gen_cceq_ior_compare. --- gcc/config/rs6000/rs6000.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 040fc88..8dc0a29 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -12420,15 +12420,15 @@ (define_insn "*creturn" ; which are generated by the branch logic. ; Prefer destructive operations where BT = BB (for crXX BT,BA,BB) -(define_insn "cceq_ior_compare" +(define_insn "@cceq_ior_compare_" [(set (match_operand:CCEQ 0 "cc_reg_operand" "=y,?y") - (compare:CCEQ (match_operator:SI 1 "boolean_operator" - [(match_operator:SI 2 + (compare:CCEQ (match_operator:GPR 1 "boolean_operator" + [(match_operator:GPR 2 "branch_positive_comparison_operator" [(match_operand 3 "cc_reg_operand" "y,y") (const_int 0)]) - (match_operator:SI 4 + (match_operator:GPR 4 "branch_positive_comparison_operator" [(match_operand 5 "cc_reg_operand" "0,y") @@ -12460,9 +12460,9 @@ (define_insn "cceq_ior_compare_complement" [(set_attr "type" "cr_logical") (set_attr "cr_logical_3op" "no,yes")]) -(define_insn "*cceq_rev_compare" +(define_insn "@cceq_rev_compare_" [(set (match_operand:CCEQ 0 "cc_reg_operand" "=y,?y") - (compare:CCEQ (match_operator:SI 1 + (compare:CCEQ (match_operator:GPR 1 "branch_positive_comparison_operator" [(match_operand 2 "cc_reg_operand" "0,y") @@ -12897,7 +12897,7 @@ (define_split rtx andexpr = gen_rtx_AND (SImode, ctrcmpcc, cccmp); if (ispos) - emit_insn (gen_cceq_ior_compare (operands[9], andexpr, ctrcmpcc, + emit_insn (gen_cceq_ior_compare (SImode, operands[9], andexpr, ctrcmpcc, operands[8], cccmp, ccin)); else emit_insn (gen_cceq_ior_compare_complement (operands[9], andexpr, ctrcmpcc,