From patchwork Sun May 12 10:31:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleg Endo X-Patchwork-Id: 243168 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 E17442C008E for ; Sun, 12 May 2013 20:32:00 +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=kuKvuuUqFFgvuFR4 mNQ9ePZt5+mbqSR9KQQDa2FEG+yczhaW24wfQtvLPNKYFTZf3fI9gTs+7VRUnqFp 2UnXZsj/bFe29qX7f+Er2OhTuiZ/IM3Rz4n3ztvlk2SdnOjinanEXx6ELbnY4+sS 5QN8H/JtUfGkE0kSx2af0PKWnNY= 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=qbRVp7jENCCQ4vi9q7wGgg QHHF8=; b=XpWx+nuHrAUN3iZB/vBWCIn0ObecrfmdAMqHRRMcZCoIW0wliz0Syn IHEAX175apGEiLRlAKfOk9rqDxBSMyotOm+IrJwlkOj8K57d+EFBnMnR2KcCWrHM Pck1ImGIG6rHr4gKZvE8+E8Vujm78tmZnnRoIR0+7ZJtpD4XTYomA= Received: (qmail 30376 invoked by alias); 12 May 2013 10:31:53 -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 30354 invoked by uid 89); 12 May 2013 10:31:49 -0000 X-Spam-SWARE-Status: No, score=-3.9 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 mailout02.t-online.de (HELO mailout02.t-online.de) (194.25.134.17) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sun, 12 May 2013 10:31:47 +0000 Received: from fwd19.aul.t-online.de (fwd19.aul.t-online.de ) by mailout02.t-online.de with smtp id 1UbTZA-0006Yi-55; Sun, 12 May 2013 12:31:44 +0200 Received: from [192.168.0.103] (EClhA0ZXZhsHty3pkHbgfC5vOdWQQnvW8JYmr4kywNwnY7iFwm86uycpMYDkn2Dw9M@[87.155.241.46]) by fwd19.t-online.de with esmtp id 1UbTZ2-1CJ3OS0; Sun, 12 May 2013 12:31:36 +0200 Message-ID: <1368354695.2241.19.camel@yam-132-YW-E178-FTW> Subject: Re: [PATCH SH] Fix PR57108 From: Oleg Endo To: gcc-patches@gcc.gnu.org Cc: christian.bruel@st.com, Kaz Kojima Date: Sun, 12 May 2013 12:31:35 +0200 In-Reply-To: <20130505.225600.535241994.kkojima@rr.iij4u.or.jp> References: <517E3DFD.6000607@st.com> <1367754273.19934.9.camel@yam-132-YW-E178-FTW> <20130505.225600.535241994.kkojima@rr.iij4u.or.jp> Mime-Version: 1.0 X-Virus-Found: No On Sun, 2013-05-05 at 22:56 +0900, Kaz Kojima wrote: > Oleg Endo wrote: > > 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). > > OK. > > > (BTW, I think the test case for this PR should have went into c-torture > > instead of target/sh ...) > > Sounds plausible. I've committed the attached patch which moves the test case to c-torture/compile as revision 198803. Tested with make check RUNTESTFLAGS="compile.exp=pr57108.c --target_board=sh-sim \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb} Cheers, Oleg testsuite/ChangeLog: PR target/57108 * gcc.target/sh/pr57108.c: Move this test case to ... * gcc.c-torture/compile/pr57108.c: ... here. Index: gcc/testsuite/gcc.c-torture/compile/pr57108.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/pr57108.c (revision 0) +++ gcc/testsuite/gcc.c-torture/compile/pr57108.c (revision 0) @@ -0,0 +1,17 @@ +/* PR target/57108 */ + +void __assert_func (void) __attribute__ ((__noreturn__)); + +void +ATATransfer (int num, int buffer) +{ + int wordCount; + + while (num > 0) + { + wordCount = num * 512 / sizeof (int); + + ((0 == (buffer & 63)) ? (void)0 : __assert_func () ); + ((0 == (wordCount & 31)) ? (void)0 : __assert_func ()); + } +} Index: gcc/testsuite/gcc.target/sh/pr57108.c =================================================================== --- gcc/testsuite/gcc.target/sh/pr57108.c (revision 198802) +++ gcc/testsuite/gcc.target/sh/pr57108.c (working copy) @@ -1,19 +0,0 @@ -/* { dg-do compile { target "sh*-*-*" } } */ -/* { dg-options "-O1" } */ - -void __assert_func (void) __attribute__ ((__noreturn__)) ; - -void ATATransfer (int num, int buffer) -{ - int wordCount; - - while (num > 0) - { - wordCount = num * 512 / sizeof (int); - - ((0 == (buffer & 63)) ? (void)0 : __assert_func () ); - ((0 == (wordCount & 31)) ? (void)0 : __assert_func ()); - } - - - }