From patchwork Fri May 31 21:28:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Segher Boessenkool X-Patchwork-Id: 248021 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 4CD2F2C0090 for ; Sat, 1 Jun 2013 07:29:39 +1000 (EST) 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:in-reply-to:references :in-reply-to:references; q=dns; s=default; b=RYkpr/F6tEtqwJot8hQ JFCt+tg//g1GbUm5EDjgL1lgXh7AocK5RNU4qb1X7i1FNSgo4pWLYBLQlPaHWHon XQ62zZDjPJEnrv3+qOUoZeXaucg2rurkrxEkPk8U+tS9HJPCoEyPiqSxyzZI2fvg Bb951mD42qJoQF1VMCH/7Nv8= 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:in-reply-to:references :in-reply-to:references; s=default; bh=wkN77pjQLSe35lOO8jqADgqM/ FU=; b=v12BcBUoCzR7FksoBwStdVL5gsDdkq0nFvvsmIlv1pK22QaJ/nOyEvBRn /EZmaM34KuMO7/oAcDRMh1Kbh4rbJIlJm5dJB+l9lLWAiHV0e/TxUF1dorEykVzY GtOqT8KXXcJwAYC+IIS3Qc93SflcgTgACO6XL8WD0iVQvK97lc= Received: (qmail 18717 invoked by alias); 31 May 2013 21:28:57 -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 18676 invoked by uid 89); 31 May 2013 21:28:57 -0000 X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL, BAYES_00, KHOP_THREADED, RP_MATCHES_RCVD autolearn=ham version=3.3.1 Received: from gcc1-power7.osuosl.org (HELO gcc1-power7.osuosl.org) (140.211.15.137) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 31 May 2013 21:28:55 +0000 Received: from gcc1-power7.osuosl.org (localhost [127.0.0.1]) by gcc1-power7.osuosl.org (8.14.6/8.14.6) with ESMTP id r4VLSgfZ060868; Fri, 31 May 2013 14:28:42 -0700 Received: (from segher@localhost) by gcc1-power7.osuosl.org (8.14.6/8.14.6/Submit) id r4VLSgFS060768; Fri, 31 May 2013 14:28:42 -0700 From: Segher Boessenkool To: gcc-patches@gcc.gnu.org Cc: dje.gcc@gmail.com, Segher Boessenkool Subject: [PATCH 5/6] rs6000: dot for shift/delayed_compare Date: Fri, 31 May 2013 14:28:10 -0700 Message-Id: In-Reply-To: <14577e1c6b530d6f4feda94ba84896983b05513b.1370028541.git.segher@kernel.crashing.org> References: <14577e1c6b530d6f4feda94ba84896983b05513b.1370028541.git.segher@kernel.crashing.org> In-Reply-To: <14577e1c6b530d6f4feda94ba84896983b05513b.1370028541.git.segher@kernel.crashing.org> References: <14577e1c6b530d6f4feda94ba84896983b05513b.1370028541.git.segher@kernel.crashing.org> Similar, but now for shift and delayed_compare. 2013-05-31 Segher Boessenkool gcc/ * config/rs6000/integer.mdm (ashl3_imm, lshr3_imm): Delete comment. * config/rs6000/integer.md: Regenerate. * config/rs6000/40x.md: Require dot=no for type=shift; where type=delayed_compare, also handle type=shift dot=yes. * config/rs6000/440.md: Ditto. * config/rs6000/476.md: Ditto. * config/rs6000/601.md: Ditto. * config/rs6000/603.md: Ditto. * config/rs6000/6xx.md: Ditto. * config/rs6000/7450.md: Ditto. * config/rs6000/7xx.md: Ditto. * config/rs6000/cell.md: Ditto. * config/rs6000/mpc.md: Ditto. * config/rs6000/power4.md: Ditto. * config/rs6000/power5.md: Ditto. * config/rs6000/power6.md: Ditto. * config/rs6000/power7.md: Ditto. * config/rs6000/rs64.md: Ditto. * config/rs6000/titan.md: Ditto. * config/rs6000/rs6000.c (rs6000_adjust_cost): Add missing TYPE_DELAYED_COMPARE case, twice. (is_cracked_insn): Handle TYPE_SHIFT. --- gcc/config/rs6000/40x.md | 6 +++--- gcc/config/rs6000/440.md | 4 ++-- gcc/config/rs6000/476.md | 6 +++--- gcc/config/rs6000/601.md | 6 +++--- gcc/config/rs6000/603.md | 6 +++--- gcc/config/rs6000/6xx.md | 6 +++--- gcc/config/rs6000/7450.md | 6 +++--- gcc/config/rs6000/7xx.md | 6 +++--- gcc/config/rs6000/cell.md | 8 ++++---- gcc/config/rs6000/e500mc64.md | 2 +- gcc/config/rs6000/integer.md | 36 ++++++++++++------------------------ gcc/config/rs6000/integer.mdm | 12 ++++-------- gcc/config/rs6000/mpc.md | 6 +++--- gcc/config/rs6000/power4.md | 6 +++--- gcc/config/rs6000/power5.md | 7 +++---- gcc/config/rs6000/power6.md | 5 ++++- gcc/config/rs6000/power7.md | 6 +++--- gcc/config/rs6000/rs6000.c | 5 ++++- gcc/config/rs6000/rs64.md | 8 ++++---- gcc/config/rs6000/titan.md | 4 ++-- 20 files changed, 70 insertions(+), 81 deletions(-) diff --git a/gcc/config/rs6000/40x.md b/gcc/config/rs6000/40x.md index 2054e65..ddd0c21 100644 --- a/gcc/config/rs6000/40x.md +++ b/gcc/config/rs6000/40x.md @@ -37,9 +37,9 @@ (define_insn_reservation "ppc403-store" 2 "iu_40x") (define_insn_reservation "ppc403-integer" 1 - (and (ior (eq_attr "type" "integer,insert_word,insert_dword,shift,trap,\ + (and (ior (eq_attr "type" "integer,insert_word,insert_dword,trap,\ cntlz,exts,isel") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "no"))) (eq_attr "cpu" "ppc403,ppc405")) "iu_40x") @@ -57,7 +57,7 @@ (define_insn_reservation "ppc403-three" 1 (define_insn_reservation "ppc403-compare" 3 (and (ior (eq_attr "type" "cmp,fast_compare,compare,delayed_compare,\ var_delayed_compare") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "yes"))) (eq_attr "cpu" "ppc403,ppc405")) "iu_40x,nothing,bpu_40x") diff --git a/gcc/config/rs6000/440.md b/gcc/config/rs6000/440.md index b4abab5..8c18cde 100644 --- a/gcc/config/rs6000/440.md +++ b/gcc/config/rs6000/440.md @@ -54,9 +54,9 @@ (define_insn_reservation "ppc440-fpstore" 3 "ppc440_issue,ppc440_l_pipe") (define_insn_reservation "ppc440-integer" 1 - (and (ior (eq_attr "type" "integer,insert_word,insert_dword,shift,\ + (and (ior (eq_attr "type" "integer,insert_word,insert_dword,\ trap,cntlz,exts,isel") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "no"))) (eq_attr "cpu" "ppc440")) "ppc440_issue,ppc440_i_pipe|ppc440_j_pipe") diff --git a/gcc/config/rs6000/476.md b/gcc/config/rs6000/476.md index 5448ab2..d68f1a4 100644 --- a/gcc/config/rs6000/476.md +++ b/gcc/config/rs6000/476.md @@ -64,8 +64,8 @@ (define_insn_reservation "ppc476-fpstore" 4 ppc476_lj_pipe") (define_insn_reservation "ppc476-simple-integer" 1 - (and (ior (eq_attr "type" "integer,insert_word,exts,shift") - (and (eq_attr "type" "var_shift_rotate") + (and (ior (eq_attr "type" "integer,insert_word,exts") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "no"))) (eq_attr "cpu" "ppc476")) "ppc476_issue,\ @@ -80,7 +80,7 @@ (define_insn_reservation "ppc476-complex-integer" 1 (define_insn_reservation "ppc476-compare" 4 (and (ior (eq_attr "type" "compare,delayed_compare,fast_compare,mfcr,mfcrf,\ mtcr,mfjmpr,mtjmpr,var_delayed_compare") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "yes"))) (eq_attr "cpu" "ppc476")) "ppc476_issue,\ diff --git a/gcc/config/rs6000/601.md b/gcc/config/rs6000/601.md index 4a7dc3f..06b060f 100644 --- a/gcc/config/rs6000/601.md +++ b/gcc/config/rs6000/601.md @@ -46,9 +46,9 @@ (define_insn_reservation "ppc601-fpstore" 3 "iu_ppc601+fpu_ppc601") (define_insn_reservation "ppc601-integer" 1 - (and (ior (eq_attr "type" "integer,insert_word,insert_dword,shift,\ + (and (ior (eq_attr "type" "integer,insert_word,insert_dword,\ trap,cntlz,exts,isel") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "no"))) (eq_attr "cpu" "ppc601")) "iu_ppc601") @@ -77,7 +77,7 @@ (define_insn_reservation "ppc601-idiv" 36 ; execute on the branch unit. (define_insn_reservation "ppc601-compare" 3 (and (ior (eq_attr "type" "cmp,compare,delayed_compare,var_delayed_compare") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "yes"))) (eq_attr "cpu" "ppc601")) "iu_ppc601,nothing,bpu_ppc601") diff --git a/gcc/config/rs6000/603.md b/gcc/config/rs6000/603.md index 05f2599..2a9e882 100644 --- a/gcc/config/rs6000/603.md +++ b/gcc/config/rs6000/603.md @@ -58,9 +58,9 @@ (define_insn_reservation "ppc603-storec" 8 "lsu_603") (define_insn_reservation "ppc603-integer" 1 - (and (ior (eq_attr "type" "integer,insert_word,insert_dword,shift,trap,\ + (and (ior (eq_attr "type" "integer,insert_word,insert_dword,trap,\ cntlz,exts,isel") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "no"))) (eq_attr "cpu" "ppc603")) "iu_603") @@ -94,7 +94,7 @@ (define_insn_reservation "ppc603-idiv" 37 (define_insn_reservation "ppc603-compare" 3 (and (ior (eq_attr "type" "cmp,fast_compare,compare,delayed_compare,\ var_delayed_compare") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "yes"))) (eq_attr "cpu" "ppc603")) "iu_603,nothing,bpu_603") diff --git a/gcc/config/rs6000/6xx.md b/gcc/config/rs6000/6xx.md index 7c1528a..2e5d846 100644 --- a/gcc/config/rs6000/6xx.md +++ b/gcc/config/rs6000/6xx.md @@ -73,9 +73,9 @@ (define_insn_reservation "ppc630-llsc" 4 "lsu_6xx") (define_insn_reservation "ppc604-integer" 1 - (and (ior (eq_attr "type" "integer,insert_word,insert_dword,shift,trap,\ + (and (ior (eq_attr "type" "integer,insert_word,insert_dword,trap,\ cntlz,exts,isel") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "no"))) (eq_attr "cpu" "ppc604,ppc604e,ppc620,ppc630")) "iu1_6xx|iu2_6xx") @@ -143,7 +143,7 @@ (define_insn_reservation "ppc620-ldiv" 37 (define_insn_reservation "ppc604-compare" 3 (and (ior (eq_attr "type" "cmp,fast_compare,compare,delayed_compare,\ var_delayed_compare") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "yes"))) (eq_attr "cpu" "ppc604,ppc604e,ppc620,ppc630")) "(iu1_6xx|iu2_6xx)") diff --git a/gcc/config/rs6000/7450.md b/gcc/config/rs6000/7450.md index 46dcc81..2de6ad8 100644 --- a/gcc/config/rs6000/7450.md +++ b/gcc/config/rs6000/7450.md @@ -74,9 +74,9 @@ (define_insn_reservation "ppc7450-sync" 35 "ppc7450_du,lsu_7450") (define_insn_reservation "ppc7450-integer" 1 - (and (ior (eq_attr "type" "integer,insert_word,insert_dword,shift,\ + (and (ior (eq_attr "type" "integer,insert_word,insert_dword,\ trap,cntlz,exts,isel") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "no"))) (eq_attr "cpu" "ppc7450")) "ppc7450_du,iu1_7450|iu2_7450|iu3_7450") @@ -110,7 +110,7 @@ (define_insn_reservation "ppc7450-idiv" 23 (define_insn_reservation "ppc7450-compare" 2 (and (ior (eq_attr "type" "cmp,fast_compare,compare,delayed_compare,\ var_delayed_compare") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "yes"))) (eq_attr "cpu" "ppc7450")) "ppc7450_du,(iu1_7450|iu2_7450|iu3_7450)") diff --git a/gcc/config/rs6000/7xx.md b/gcc/config/rs6000/7xx.md index 2085e79..768d8db 100644 --- a/gcc/config/rs6000/7xx.md +++ b/gcc/config/rs6000/7xx.md @@ -64,9 +64,9 @@ (define_insn_reservation "ppc750-storec" 8 "ppc750_du,lsu_7xx") (define_insn_reservation "ppc750-integer" 1 - (and (ior (eq_attr "type" "integer,insert_word,insert_dword,shift,\ + (and (ior (eq_attr "type" "integer,insert_word,insert_dword,\ trap,cntlz,exts,isel") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "no"))) (eq_attr "cpu" "ppc750,ppc7400")) "ppc750_du,iu1_7xx|iu2_7xx") @@ -104,7 +104,7 @@ (define_insn_reservation "ppc750-idiv" 19 (define_insn_reservation "ppc750-compare" 2 (and (ior (eq_attr "type" "cmp,fast_compare,compare,delayed_compare,\ var_delayed_compare") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "yes"))) (eq_attr "cpu" "ppc750,ppc7400")) "ppc750_du,(iu1_7xx|iu2_7xx)") diff --git a/gcc/config/rs6000/cell.md b/gcc/config/rs6000/cell.md index b2ea065..7bc792a 100644 --- a/gcc/config/rs6000/cell.md +++ b/gcc/config/rs6000/cell.md @@ -155,8 +155,8 @@ (define_insn_reservation "cell-vecstore" 1 ;; Integer latency is 2 cycles (define_insn_reservation "cell-integer" 2 - (and (ior (eq_attr "type" "integer,insert_dword,shift,trap,cntlz,exts,isel") - (and (eq_attr "type" "var_shift_rotate") + (and (ior (eq_attr "type" "integer,insert_dword,trap,cntlz,exts,isel") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "no"))) (eq_attr "cpu" "cell")) "slot01,fxu_cell") @@ -189,7 +189,7 @@ (define_insn_reservation "cell-cmp" 1 (define_insn_reservation "cell-fast-cmp" 2 (and (ior (eq_attr "type" "fast_compare,delayed_compare,compare,\ var_delayed_compare") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "yes"))) (eq_attr "cpu" "cell") (eq_attr "cell_micro" "not")) @@ -198,7 +198,7 @@ (define_insn_reservation "cell-fast-cmp" 2 (define_insn_reservation "cell-cmp-microcoded" 9 (and (ior (eq_attr "type" "fast_compare,delayed_compare,compare,\ var_delayed_compare") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "yes"))) (eq_attr "cpu" "cell") (eq_attr "cell_micro" "always")) diff --git a/gcc/config/rs6000/e500mc64.md b/gcc/config/rs6000/e500mc64.md index b238335..a3e6ea1 100644 --- a/gcc/config/rs6000/e500mc64.md +++ b/gcc/config/rs6000/e500mc64.md @@ -75,7 +75,7 @@ (define_insn_reservation "e500mc64_su" 1 "e500mc64_decode,e500mc64_issue+e500mc64_su_stage0+e500mc64_retire") (define_insn_reservation "e500mc64_su2" 2 - (and (eq_attr "type" "cmp,compare,delayed_compare,fast_compare,trap") + (and (eq_attr "type" "cmp,compare,fast_compare,trap") (eq_attr "cpu" "ppce500mc64")) "e500mc64_decode,e500mc64_issue+e500mc64_su_stage0,e500mc64_retire") diff --git a/gcc/config/rs6000/integer.md b/gcc/config/rs6000/integer.md index f0b55e1..ce2c240 100644 --- a/gcc/config/rs6000/integer.md +++ b/gcc/config/rs6000/integer.md @@ -38,8 +38,7 @@ (define_insn "ashl3" (match_operand:SI 2 "gpc_reg_operand" "r")))] "" "sl %0,%1,%2" - [(set_attr "type" "var_shift_rotate") -]) + [(set_attr "type" "var_shift_rotate")]) (define_insn "*ashl3_dot" [(set (match_operand:CC 3 "cc_reg_operand" "=x,?y") @@ -54,8 +53,7 @@ (define_insn "*ashl3_dot" #" [(set_attr "length" "4,8") (set_attr "dot" "yes,no") - (set_attr "type" "var_shift_rotate") -]) + (set_attr "type" "var_shift_rotate")]) (define_split [(set (match_operand:CC 3 "cc_reg_not_cr0_operand" "") @@ -89,8 +87,7 @@ (define_insn "*ashl3_dot2" #" [(set_attr "length" "4,8") (set_attr "dot" "yes,no") - (set_attr "type" "var_shift_rotate") -]) + (set_attr "type" "var_shift_rotate")]) (define_split [(set (match_operand:CC 3 "cc_reg_not_cr0_operand" "") @@ -117,8 +114,7 @@ (define_insn "*ashl3_imm" (match_operand:SI 2 "const_int_operand" "i")))] "UINTVAL (operands[2]) < GET_MODE_BITSIZE (mode)" "sli %0,%1,%2" - [(set_attr "type" "shift") ; delayed_compare -]) + [(set_attr "type" "shift")]) (define_insn "*ashl3_imm_dot" [(set (match_operand:CC 3 "cc_reg_operand" "=x,?y") @@ -134,8 +130,7 @@ (define_insn "*ashl3_imm_dot" #" [(set_attr "length" "4,8") (set_attr "dot" "yes,no") - (set_attr "type" "shift") ; delayed_compare -]) + (set_attr "type" "shift")]) (define_split [(set (match_operand:CC 3 "cc_reg_not_cr0_operand" "") @@ -171,8 +166,7 @@ (define_insn "*ashl3_imm_dot2" #" [(set_attr "length" "4,8") (set_attr "dot" "yes,no") - (set_attr "type" "shift") ; delayed_compare -]) + (set_attr "type" "shift")]) (define_split [(set (match_operand:CC 3 "cc_reg_not_cr0_operand" "") @@ -200,8 +194,7 @@ (define_insn "lshr3" (match_operand:SI 2 "gpc_reg_operand" "r")))] "" "sr %0,%1,%2" - [(set_attr "type" "var_shift_rotate") -]) + [(set_attr "type" "var_shift_rotate")]) (define_insn "*lshr3_dot" [(set (match_operand:CC 3 "cc_reg_operand" "=x,?y") @@ -216,8 +209,7 @@ (define_insn "*lshr3_dot" #" [(set_attr "length" "4,8") (set_attr "dot" "yes,no") - (set_attr "type" "var_shift_rotate") -]) + (set_attr "type" "var_shift_rotate")]) (define_split [(set (match_operand:CC 3 "cc_reg_not_cr0_operand" "") @@ -251,8 +243,7 @@ (define_insn "*lshr3_dot2" #" [(set_attr "length" "4,8") (set_attr "dot" "yes,no") - (set_attr "type" "var_shift_rotate") -]) + (set_attr "type" "var_shift_rotate")]) (define_split [(set (match_operand:CC 3 "cc_reg_not_cr0_operand" "") @@ -279,8 +270,7 @@ (define_insn "*lshr3_imm" (match_operand:SI 2 "const_int_operand" "i")))] "UINTVAL (operands[2]) < GET_MODE_BITSIZE (mode)" "sri %0,%1,%2" - [(set_attr "type" "shift") ; delayed_compare -]) + [(set_attr "type" "shift")]) (define_insn "*lshr3_imm_dot" [(set (match_operand:CC 3 "cc_reg_operand" "=x,?y") @@ -296,8 +286,7 @@ (define_insn "*lshr3_imm_dot" #" [(set_attr "length" "4,8") (set_attr "dot" "yes,no") - (set_attr "type" "shift") ; delayed_compare -]) + (set_attr "type" "shift")]) (define_split [(set (match_operand:CC 3 "cc_reg_not_cr0_operand" "") @@ -333,8 +322,7 @@ (define_insn "*lshr3_imm_dot2" #" [(set_attr "length" "4,8") (set_attr "dot" "yes,no") - (set_attr "type" "shift") ; delayed_compare -]) + (set_attr "type" "shift")]) (define_split [(set (match_operand:CC 3 "cc_reg_not_cr0_operand" "") diff --git a/gcc/config/rs6000/integer.mdm b/gcc/config/rs6000/integer.mdm index d972f35..96ea3e9 100644 --- a/gcc/config/rs6000/integer.mdm +++ b/gcc/config/rs6000/integer.mdm @@ -35,8 +35,7 @@ "" "mode == Pmode && rs6000_gen_cell_microcode" "sl %0,%1,%2" - [(set_attr "type" "var_shift_rotate") -]) + [(set_attr "type" "var_shift_rotate")]) (define_dot_insn "*ashl3_imm" [(set (match_operand:GPR 0 "gpc_reg_operand" "=r") @@ -45,8 +44,7 @@ "UINTVAL (operands[2]) < GET_MODE_BITSIZE (mode)" "mode == Pmode && rs6000_gen_cell_microcode" "sli %0,%1,%2" - [(set_attr "type" "shift") ; delayed_compare -]) + [(set_attr "type" "shift")]) (define_dot_insn "lshr3" [(set (match_operand:GPR 0 "gpc_reg_operand" "=r") @@ -55,8 +53,7 @@ "" "mode == Pmode && rs6000_gen_cell_microcode" "sr %0,%1,%2" - [(set_attr "type" "var_shift_rotate") -]) + [(set_attr "type" "var_shift_rotate")]) (define_dot_insn "*lshr3_imm" [(set (match_operand:GPR 0 "gpc_reg_operand" "=r") @@ -65,8 +62,7 @@ "UINTVAL (operands[2]) < GET_MODE_BITSIZE (mode)" "mode == Pmode && rs6000_gen_cell_microcode" "sri %0,%1,%2" - [(set_attr "type" "shift") ; delayed_compare -]) + [(set_attr "type" "shift")]) ; -- Logical instructions: diff --git a/gcc/config/rs6000/mpc.md b/gcc/config/rs6000/mpc.md index 19a461f..b6d421a 100644 --- a/gcc/config/rs6000/mpc.md +++ b/gcc/config/rs6000/mpc.md @@ -42,9 +42,9 @@ (define_insn_reservation "mpccore-fpload" 2 "lsu_mpc") (define_insn_reservation "mpccore-integer" 1 - (and (ior (eq_attr "type" "integer,insert_word,insert_dword,shift,trap,\ + (and (ior (eq_attr "type" "integer,insert_word,insert_dword,trap,\ cntlz,exts,isel") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "no"))) (eq_attr "cpu" "mpccore")) "iu_mpc") @@ -73,7 +73,7 @@ (define_insn_reservation "mpccore-idiv" 6 (define_insn_reservation "mpccore-compare" 3 (and (ior (eq_attr "type" "cmp,fast_compare,compare,delayed_compare,\ var_delayed_compare") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "yes"))) (eq_attr "cpu" "mpccore")) "iu_mpc,nothing,bpu_mpc") diff --git a/gcc/config/rs6000/power4.md b/gcc/config/rs6000/power4.md index 72a3355..51369f4 100644 --- a/gcc/config/rs6000/power4.md +++ b/gcc/config/rs6000/power4.md @@ -185,8 +185,8 @@ (define_insn_reservation "power4-llsc" 11 ; Integer latency is 2 cycles (define_insn_reservation "power4-integer" 2 - (and (ior (eq_attr "type" "integer,insert_dword,shift,trap,cntlz,exts,isel") - (and (eq_attr "type" "var_shift_rotate") + (and (ior (eq_attr "type" "integer,insert_dword,trap,cntlz,exts,isel") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "no"))) (eq_attr "cpu" "power4")) "iq_power4") @@ -228,7 +228,7 @@ (define_insn_reservation "power4-cmp" 3 (define_insn_reservation "power4-compare" 2 (and (ior (eq_attr "type" "compare,delayed_compare,var_delayed_compare") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "yes"))) (eq_attr "cpu" "power4")) "(du1_power4+du2_power4|du2_power4+du3_power4|du3_power4+du4_power4),\ diff --git a/gcc/config/rs6000/power5.md b/gcc/config/rs6000/power5.md index 54853d7..a7f617f 100644 --- a/gcc/config/rs6000/power5.md +++ b/gcc/config/rs6000/power5.md @@ -141,9 +141,8 @@ (define_insn_reservation "power5-llsc" 11 ; Integer latency is 2 cycles (define_insn_reservation "power5-integer" 2 - (and (ior (eq_attr "type" "integer,insert_dword,shift,trap,\ - cntlz,exts,isel,popcnt") - (and (eq_attr "type" "var_shift_rotate") + (and (ior (eq_attr "type" "integer,insert_dword,trap,cntlz,exts,isel,popcnt") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "no"))) (eq_attr "cpu" "power5")) "iq_power5") @@ -182,7 +181,7 @@ (define_insn_reservation "power5-cmp" 3 (define_insn_reservation "power5-compare" 2 (and (ior (eq_attr "type" "compare,delayed_compare,var_delayed_compare") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "yes"))) (eq_attr "cpu" "power5")) "du1_power5+du2_power5,iu1_power5,iu2_power5") diff --git a/gcc/config/rs6000/power6.md b/gcc/config/rs6000/power6.md index f4082e9..c6765aa 100644 --- a/gcc/config/rs6000/power6.md +++ b/gcc/config/rs6000/power6.md @@ -213,6 +213,7 @@ (define_insn_reservation "power6-exts" 1 (define_insn_reservation "power6-shift" 1 (and (eq_attr "type" "shift") + (eq_attr "dot" "no") (eq_attr "cpu" "power6")) "FXU_power6") @@ -323,7 +324,9 @@ (define_bypass 1 "power6-compare,\ "store_data_bypass_p") (define_insn_reservation "power6-delayed-compare" 2 ; N/A - (and (eq_attr "type" "delayed_compare") + (and (ior (eq_attr "type" "delayed_compare") + (and (eq_attr "type" "shift") + (eq_attr "dot" "yes"))) (eq_attr "cpu" "power6")) "FXU_power6") diff --git a/gcc/config/rs6000/power7.md b/gcc/config/rs6000/power7.md index 7b999d1..bc9c663 100644 --- a/gcc/config/rs6000/power7.md +++ b/gcc/config/rs6000/power7.md @@ -149,9 +149,9 @@ (define_insn_reservation "power7-sync" 11 ; FX Unit (define_insn_reservation "power7-integer" 1 - (and (ior (eq_attr "type" "integer,insert_word,insert_dword,shift,trap,\ + (and (ior (eq_attr "type" "integer,insert_word,insert_dword,trap,\ exts,isel,popcnt") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "no"))) (eq_attr "cpu" "power7")) "DU_power7,FXU_power7") @@ -178,7 +178,7 @@ (define_insn_reservation "power7-cmp" 1 (define_insn_reservation "power7-compare" 2 (and (ior (eq_attr "type" "compare,delayed_compare,var_delayed_compare") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "yes"))) (eq_attr "cpu" "power7")) "DU2F_power7,FXU_power7,FXU_power7") diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index e0d1112..dfcb3d7 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -23217,6 +23217,7 @@ rs6000_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost) case TYPE_FAST_COMPARE: case TYPE_EXTS: case TYPE_SHIFT: + case TYPE_DELAYED_COMPARE: case TYPE_INSERT_WORD: case TYPE_INSERT_DWORD: case TYPE_FPLOAD_U: @@ -23299,6 +23300,7 @@ rs6000_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost) case TYPE_FAST_COMPARE: case TYPE_EXTS: case TYPE_SHIFT: + case TYPE_DELAYED_COMPARE: case TYPE_INSERT_WORD: case TYPE_INSERT_DWORD: case TYPE_FPLOAD_U: @@ -23472,7 +23474,8 @@ is_cracked_insn (rtx insn) || type == TYPE_IDIV || type == TYPE_LDIV || type == TYPE_INSERT_WORD) return true; - if (get_attr_dot (insn) == DOT_YES && type == TYPE_VAR_SHIFT_ROTATE) + if (get_attr_dot (insn) == DOT_YES + && (type == TYPE_SHIFT || type == TYPE_VAR_SHIFT_ROTATE)) return true; } diff --git a/gcc/config/rs6000/rs64.md b/gcc/config/rs6000/rs64.md index 546f0cb..4b0d5e7 100644 --- a/gcc/config/rs6000/rs64.md +++ b/gcc/config/rs6000/rs64.md @@ -46,9 +46,9 @@ (define_insn_reservation "rs64a-llsc" 2 "lsu_rs64") (define_insn_reservation "rs64a-integer" 1 - (and (ior (eq_attr "type" "integer,insert_word,insert_dword,shift,trap,\ + (and (ior (eq_attr "type" "integer,insert_word,insert_dword,trap,\ cntlz,exts,isel") - (and (eq_attr "type" "var_shift_rotate") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "no"))) (eq_attr "cpu" "rs64a")) "iu_rs64") @@ -95,8 +95,8 @@ (define_insn_reservation "rs64a-ldiv" 66 (define_insn_reservation "rs64a-compare" 3 (and (ior (eq_attr "type" "cmp,fast_compare,compare,\ - delayed_compare,var_delayed_compare") - (and (eq_attr "type" "var_shift_rotate") + delayed_compare,var_delayed_compare") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "yes"))) (eq_attr "cpu" "rs64a")) "iu_rs64,nothing,bpu_rs64") diff --git a/gcc/config/rs6000/titan.md b/gcc/config/rs6000/titan.md index c3830f1..f92a035 100644 --- a/gcc/config/rs6000/titan.md +++ b/gcc/config/rs6000/titan.md @@ -55,8 +55,8 @@ (define_insn_reservation "titan_mulhw" 4 (define_bypass 2 "titan_mulhw" "titan_mulhw") (define_insn_reservation "titan_fxu_shift_and_rotate" 2 - (and (ior (eq_attr "type" "insert_word,shift,cntlz") - (and (eq_attr "type" "var_shift_rotate") + (and (ior (eq_attr "type" "insert_word,cntlz") + (and (eq_attr "type" "shift,var_shift_rotate") (eq_attr "dot" "no"))) (eq_attr "cpu" "titan")) "titan_issue,titan_fxu_sh,nothing*2,titan_fxu_wb")