From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34639 invoked by alias); 10 May 2015 16:15:30 -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 34629 invoked by uid 89); 10 May 2015 16:15:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Sun, 10 May 2015 16:15:29 +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 t4AGFRFj009664; Sun, 10 May 2015 09:15:27 -0700 Received: (from segher@localhost) by gcc1-power7.osuosl.org (8.14.6/8.14.6/Submit) id t4AGFQxK009563; Sun, 10 May 2015 09:15:26 -0700 From: Segher Boessenkool To: gcc-patches@gcc.gnu.org Cc: dje.gcc@gmail.com, Segher Boessenkool Subject: [PATCH 3/6] rs6000: Don't use zero_extract in the bswap:HI splitter Date: Sun, 10 May 2015 16:15:00 -0000 Message-Id: In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00850.txt.bz2 The next patch removes the zero_extract insn this splits to. Write it as (and (lshiftrt ... instead. Okay for trunk? Segher 2015-05-10 Segher Boessenkool * config/rs6000/rs6000.md (define_split for bswaphi): Don't use zero_extract. --- gcc/config/rs6000/rs6000.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index acf890c..4bd16ee 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -2184,17 +2184,15 @@ (define_insn "bswaphi2_internal" [(set_attr "length" "4,4,12") (set_attr "type" "load,store,*")]) -;; We are always BITS_BIG_ENDIAN, so the (const_int 16) below is -;; correct for -mlittle as well as -mbig. (define_split [(set (match_operand:HI 0 "gpc_reg_operand" "") (bswap:HI (match_operand:HI 1 "gpc_reg_operand" ""))) (clobber (match_operand:SI 2 "gpc_reg_operand" ""))] "reload_completed" [(set (match_dup 3) - (zero_extract:SI (match_dup 4) - (const_int 8) - (const_int 16))) + (and:SI (lshiftrt:SI (match_dup 4) + (const_int 8)) + (const_int 255))) (set (match_dup 2) (and:SI (ashift:SI (match_dup 4) (const_int 8)) -- 1.8.1.4