From patchwork Sun May 5 11:44:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleg Endo X-Patchwork-Id: 241507 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 9EB932C00BC for ; Sun, 5 May 2013 21:44:50 +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 :message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version; q=dns; s=default; b=UlApLyt08jC1VpSG yfoCJdsk2OAYp5MOWROfl9ztXL7HQYbL0qDbispwncGxDEndWU/owgbuJwCQDRAn lMNibkKhidbaacJKzEF94hQmmfUEDd/eaUWcC7s+sklf4il1k0b3kLvgqwpCkw6w qYlcgGsSczQWpXXOPFhtonTxmPc= 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 :message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version; s=default; bh=2vyQt6bItQmdgQfjyQPTyL nKzuA=; b=L4DrUo1yMnjL9JViWdvvxkxjMfQoP4zMym+b4VeMGoqP0jgtUEiXcT nqLmxSFsvJeM4fS2xmDX7U6uzoiAjNRsxhASwR84/iVRgc7vBc6tFQ830vVYo1av o1il9koxvqcR/idKwz/vPUd1ib6fOU1epZRRQlAodfe9Jm+Wiivis= Received: (qmail 29490 invoked by alias); 5 May 2013 11:44:44 -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 29480 invoked by uid 89); 5 May 2013 11:44:44 -0000 X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=AWL, BAYES_00, KHOP_THREADED, RCVD_IN_DNSWL_NONE, RCVD_IN_HOSTKARMA_NO, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from mailout07.t-online.de (HELO mailout07.t-online.de) (194.25.134.83) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sun, 05 May 2013 11:44:42 +0000 Received: from fwd54.aul.t-online.de (fwd54.aul.t-online.de ) by mailout07.t-online.de with smtp id 1UYxMs-0004Fz-6w; Sun, 05 May 2013 13:44:38 +0200 Received: from [192.168.0.103] (E47r4eZVQhzVtOatLFdITwGSN46hkd+KB1pk8j1DhoTotmqqNZ+H-D3cnZh-oMGgM2@[87.155.254.142]) by fwd54.t-online.de with esmtp id 1UYxMq-04co0e0; Sun, 5 May 2013 13:44:36 +0200 Message-ID: <1367754273.19934.9.camel@yam-132-YW-E178-FTW> Subject: Re: [PATCH SH] Fix PR57108 From: Oleg Endo To: Christian Bruel Cc: "gcc-patches@gcc.gnu.org" , Kaz Kojima Date: Sun, 05 May 2013 13:44:33 +0200 In-Reply-To: <517E3DFD.6000607@st.com> References: <517E3DFD.6000607@st.com> Mime-Version: 1.0 X-Virus-Found: No Hi, On Mon, 2013-04-29 at 11:31 +0200, Christian Bruel wrote: > Hello, > > This patches set the correct operand mode for tstsi_t_zero_extract_eq, > to avoid reload generating a move between a constant and a void register. > > Reg tested for sh-elf. No performance impact Unfortunately after your patch the test case for PR 49263 showed some failures for SH2A and SH4A ('tst #imm,R0' insn not utilized in some cases). The operand mode in the tstsi_t_zero_extract_eq pattern was void on purpose to match any mode (at least QI HI SI DI). The attached patch fixes that. OK for trunk and 4.8 if it passes testing? (I'd leave 4.7 alone since it doesn't have the iterators.md). (BTW, I think the test case for this PR should have went into c-torture instead of target/sh ...) Cheers, Oleg gcc/ChangeLog: PR target/57108 * config/sh/sh.md (tstsi_t_zero_extract_eq): Use QIHISIDI mode iterator. Index: gcc/config/sh/sh.md =================================================================== --- gcc/config/sh/sh.md (revision 198595) +++ gcc/config/sh/sh.md (working copy) @@ -687,9 +687,9 @@ [(set_attr "type" "mt_group")]) ;; Extract contiguous bits and compare them against zero. -(define_insn "tstsi_t_zero_extract_eq" +(define_insn "tst_t_zero_extract_eq" [(set (reg:SI T_REG) - (eq:SI (zero_extract:SI (match_operand:SI 0 "logical_operand" "z") + (eq:SI (zero_extract:SI (match_operand:QIHISIDI 0 "logical_operand" "z") (match_operand:SI 1 "const_int_operand") (match_operand:SI 2 "const_int_operand")) (const_int 0)))]