From patchwork Fri Dec 6 17:26:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrylo Tkachov X-Patchwork-Id: 298128 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 144A12C00A8 for ; Sat, 7 Dec 2013 04:27:07 +1100 (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:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=buYn2bS6pue6tspG/Jwo26QfziC0E+OViLXLb0fmOFj 3t7Jewfesiiw3zMALuSd5bKdzSyMDAslUfm00ObZvyPlhUd5HV/W3taOuivNxP99 3YfAxnepIM3ry4EiEjr29Jj1xSd/opqNiEphG/9HWRLhrgTxyCH4Z2X//TRjcepU = 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:date:from:mime-version:to:cc:subject:content-type; s=default; bh=E8V8rjssxnotBSkudI3b2fEZcYk=; b=Z3D/JjFh7LFwMbHPg KX+XcM49x0Db7XjkzmFkaeWjB5QWj5r7SoGgQVsVpdPy0ldzL3dAHTeEkLmW4bWB BRto3lLcRYFG0fk6wpCc9xZSip6ZggDEt3TM8u9OgbDWukQscHkEg0v+S43TAIz8 G+PyMnx69h2cUGrG+/cJxXoDSw= Received: (qmail 25246 invoked by alias); 6 Dec 2013 17:27:01 -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 25230 invoked by uid 89); 6 Dec 2013 17:27:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from Unknown (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Dec 2013 17:26:59 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Fri, 06 Dec 2013 17:26:50 +0000 Received: from [10.1.208.24] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 6 Dec 2013 17:26:49 +0000 Message-ID: <52A208D9.4010600@arm.com> Date: Fri, 06 Dec 2013 17:26:49 +0000 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8 MIME-Version: 1.0 To: GCC Patches CC: 'Richard Biener' Subject: [PATCH] Improve scan pattern in gcc.dg/tree-ssa/loop-31.c X-MC-Unique: 113120617265018301 X-IsSubscribed: yes Hi all, The testcase gcc.dg/tree-ssa/loop-31.c started failing on arm with r202165. The scan dump pattern looks for "+ 2" appearing exactly once. With r202165 the loop header is modified from: : ivtmp.5_10 = (unsigned int) &a[4294967295]; _16 = (unsigned int) len_4(D); _17 = _16 * 2; _18 = (unsigned int) &a; _19 = _18 + 4294967294; _20 = _19 + _17; to: : ivtmp.5_10 = (unsigned int) &a[4294967295]; _16 = (sizetype) len_4(D); _17 = _16 + 2147483647; <<<< "+ 2" will match here. _18 = _17 * 2; _19 = &a + _18; _20 = (unsigned int) _19; Since the strength reduction in the loop itself that this testcase is testing is unaffected, this patch just updates the pattern to be "+ 2;" to match the induction variable increment: ivtmp.5_11 = ivtmp.5_1 + 2; Now the testcase passes on arm. Ok for trunk? Thanks, Kyrill 2013-12-06 Kyrylo Tkachov * gcc.dg/tree-ssa/loop-31.c: Update scan pattern. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-31.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-31.c index 4f22637..fa18f5e 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/loop-31.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-31.c @@ -15,7 +15,7 @@ short foo (int len, int v) /* When we do not have addressing mode including multiplication, the memory access should be strength-reduced. */ -/* { dg-final { scan-tree-dump-times " \\+ 2" 1 "optimized" { target arm*-*-* } } } */ -/* { dg-final { scan-tree-dump-times " \\+ 2" 1 "optimized" { target { ia64-*-* && ilp32 } } } } */ -/* { dg-final { scan-tree-dump-times " \\+ 2" 2 "optimized" { target { ia64-*-* && lp64 } } } } */ +/* { dg-final { scan-tree-dump-times " \\+ 2;" 1 "optimized" { target arm*-*-* } } } */ +/* { dg-final { scan-tree-dump-times " \\+ 2;" 1 "optimized" { target { ia64-*-* && ilp32 } } } } */ +/* { dg-final { scan-tree-dump-times " \\+ 2;" 2 "optimized" { target { ia64-*-* && lp64 } } } } */ /* { dg-final { cleanup-tree-dump "optimized" } } */