From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130988 invoked by alias); 4 Sep 2017 16:43:02 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 130974 invoked by uid 89); 4 Sep 2017 16:43:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=January, orn, r0, orr X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Sep 2017 16:42:56 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BEAA580D; Mon, 4 Sep 2017 09:42:54 -0700 (PDT) Received: from [10.2.207.77] (e100706-lin.cambridge.arm.com [10.2.207.77]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id ED3E63F3E1; Mon, 4 Sep 2017 09:42:53 -0700 (PDT) Message-ID: <59AD828C.4060801@foss.arm.com> Date: Mon, 04 Sep 2017 16:43:00 -0000 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Wilco Dijkstra , GCC Patches CC: nd , Richard Earnshaw Subject: Re: [PATCH][ARM] Remove Thumb-2 iordi_not patterns References: ,, In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2017-09/txt/msg00196.txt.bz2 Hi Wilco, Sorry for the delay... On 27/06/17 16:38, Wilco Dijkstra wrote: > > > ping > > > From: Wilco Dijkstra > Sent: 17 January 2017 18:00 > To: GCC Patches > Cc: nd; Kyrylo Tkachov; Richard Earnshaw > Subject: [PATCH][ARM] Remove Thumb-2 iordi_not patterns > > After Bernd's DImode patch [1] almost all DImode operations are expanded > early (except for -mfpu=neon). This means the Thumb-2 iordi_notdi_di > patterns are no longer used - the split ORR and NOT instructions are > merged > into ORN by Combine. With -mfpu=neon the iordi_notdi_di patterns are used > on Thumb-2, and after this patch the orndi3_neon pattern matches instead > (which still emits ORN). After this there are no Thumb-2 specific > DImode patterns. > > [1] https://gcc.gnu.org/ml/gcc-patches/2016-11/msg02796.html > > ChangeLog: > 2017-01-17 Wilco Dijkstra > > * config/arm/thumb2.md (iordi_notdi_di): Remove pattern. > (iordi_notzesidi_di): Likewise. > (iordi_notdi_zesidi): Likewise. > (iordi_notsesidi_di): Likewise. > > -- > > diff --git a/gcc/config/arm/thumb2.md b/gcc/config/arm/thumb2.md > index > 2e7580f220eae1524fef69719b1796f50f5cf27c..91471d4650ecae4f4e87b549d84d11adf3014ad2 > 100644 > --- a/gcc/config/arm/thumb2.md > +++ b/gcc/config/arm/thumb2.md > @@ -1434,103 +1434,6 @@ > (set_attr "type" "alu_sreg")] > ) > > -; Constants for op 2 will never be given to these patterns. > -(define_insn_and_split "*iordi_notdi_di" > - [(set (match_operand:DI 0 "s_register_operand" "=&r,&r") > - (ior:DI (not:DI (match_operand:DI 1 "s_register_operand" "0,r")) > - (match_operand:DI 2 "s_register_operand" "r,0")))] > - "TARGET_THUMB2" > - "#" > - "TARGET_THUMB2 && reload_completed" > - [(set (match_dup 0) (ior:SI (not:SI (match_dup 1)) (match_dup 2))) > - (set (match_dup 3) (ior:SI (not:SI (match_dup 4)) (match_dup 5)))] > - " > - { > - operands[3] = gen_highpart (SImode, operands[0]); > - operands[0] = gen_lowpart (SImode, operands[0]); > - operands[4] = gen_highpart (SImode, operands[1]); > - operands[1] = gen_lowpart (SImode, operands[1]); > - operands[5] = gen_highpart (SImode, operands[2]); > - operands[2] = gen_lowpart (SImode, operands[2]); > - }" > - [(set_attr "length" "8") > - (set_attr "predicable" "yes") > - (set_attr "predicable_short_it" "no") > - (set_attr "type" "multiple")] > -) So I get why we delete this, since we have orndi3_neon in neon.md for the NEON version anyway... > - > -(define_insn_and_split "*iordi_notzesidi_di" > - [(set (match_operand:DI 0 "s_register_operand" "=&r,&r") > - (ior:DI (not:DI (zero_extend:DI > - (match_operand:SI 2 "s_register_operand" "r,r"))) > - (match_operand:DI 1 "s_register_operand" "0,?r")))] > - "TARGET_THUMB2" > - "#" > - ; (not (zero_extend...)) means operand0 will always be 0xffffffff > - "TARGET_THUMB2 && reload_completed" > - [(set (match_dup 0) (ior:SI (not:SI (match_dup 2)) (match_dup 1))) > - (set (match_dup 3) (const_int -1))] > - " > - { > - operands[3] = gen_highpart (SImode, operands[0]); > - operands[0] = gen_lowpart (SImode, operands[0]); > - operands[1] = gen_lowpart (SImode, operands[1]); > - }" > - [(set_attr "length" "4,8") > - (set_attr "predicable" "yes") > - (set_attr "predicable_short_it" "no") > - (set_attr "type" "multiple")] > -) > - > -(define_insn_and_split "*iordi_notdi_zesidi" > - [(set (match_operand:DI 0 "s_register_operand" "=&r,&r") > - (ior:DI (not:DI (match_operand:DI 2 "s_register_operand" "0,?r")) > - (zero_extend:DI > - (match_operand:SI 1 "s_register_operand" "r,r"))))] > - "TARGET_THUMB2" > - "#" > - "TARGET_THUMB2 && reload_completed" > - [(set (match_dup 0) (ior:SI (not:SI (match_dup 2)) (match_dup 1))) > - (set (match_dup 3) (not:SI (match_dup 4)))] > - " > - { > - operands[3] = gen_highpart (SImode, operands[0]); > - operands[0] = gen_lowpart (SImode, operands[0]); > - operands[1] = gen_lowpart (SImode, operands[1]); > - operands[4] = gen_highpart (SImode, operands[2]); > - operands[2] = gen_lowpart (SImode, operands[2]); > - }" > - [(set_attr "length" "8") > - (set_attr "predicable" "yes") > - (set_attr "predicable_short_it" "no") > - (set_attr "type" "multiple")] > -) > - > -(define_insn_and_split "*iordi_notsesidi_di" > - [(set (match_operand:DI 0 "s_register_operand" "=&r,&r") > - (ior:DI (not:DI (sign_extend:DI > - (match_operand:SI 2 "s_register_operand" "r,r"))) > - (match_operand:DI 1 "s_register_operand" "0,r")))] > - "TARGET_THUMB2" > - "#" > - "TARGET_THUMB2 && reload_completed" > - [(set (match_dup 0) (ior:SI (not:SI (match_dup 2)) (match_dup 1))) > - (set (match_dup 3) (ior:SI (not:SI > - (ashiftrt:SI (match_dup 2) (const_int > 31))) > - (match_dup 4)))] > - " > - { > - operands[3] = gen_highpart (SImode, operands[0]); > - operands[0] = gen_lowpart (SImode, operands[0]); > - operands[4] = gen_highpart (SImode, operands[1]); > - operands[1] = gen_lowpart (SImode, operands[1]); > - }" > - [(set_attr "length" "8") > - (set_attr "predicable" "yes") > - (set_attr "predicable_short_it" "no") > - (set_attr "type" "multiple")] > -) > - ... but why can we delete all these? As far as I can see they still perform useful splitting and don't have a NEON-specific pattern. Am I missing something? Thanks, Kyrill > (define_insn "*orsi_notsi_si" > [(set (match_operand:SI 0 "s_register_operand" "=r") > (ior:SI (not:SI (match_operand:SI 2 "s_register_operand" "r"))