From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102102 invoked by alias); 9 Mar 2015 09:54:12 -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 102092 invoked by uid 89); 9 Mar 2015 09:54:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-la0-f41.google.com Received: from mail-la0-f41.google.com (HELO mail-la0-f41.google.com) (209.85.215.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 09 Mar 2015 09:54:10 +0000 Received: by labmn12 with SMTP id mn12so2539997lab.8 for ; Mon, 09 Mar 2015 02:54:07 -0700 (PDT) X-Received: by 10.152.2.193 with SMTP id 1mr24578582law.17.1425894846987; Mon, 09 Mar 2015 02:54:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.83.130 with HTTP; Mon, 9 Mar 2015 02:53:26 -0700 (PDT) In-Reply-To: <1425467354-6018-1-git-send-email-alex.velenko@arm.com> References: <1425467354-6018-1-git-send-email-alex.velenko@arm.com> From: Steven Bosscher Date: Mon, 09 Mar 2015 09:54:00 -0000 Message-ID: Subject: Re: [PATCH] [RTL] Relax CSE check to set REG_EQUAL notes. To: Alex Velenko Cc: GCC Patches , Marcus Shawcroft Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00452.txt.bz2 On Wed, Mar 4, 2015 at 12:09 PM, Alex Velenko wrote: > For example, in arm testcase pr43920-2.c, CSE previously decided not to put > an "obvious" note on insn 9, as set value was the same as note value. > At the same time, other insns set up as -1 were set up through a register > and did get a note: ...which is the point of the REG_EQUAL notes. In insn 8 there is a REG_EQUAL note to show that the value of r111 is known. In insn 9 the known value is, well, known from SET_SRC so there is no need for a REG_EQUAL note. Adding REG_EQUAL notes in such cases is just wasteful. > (insn 9 53 34 8 (set (reg:SI 110 [ D.4934 ]) > (const_int -1 [0xffffffffffffffff])) /work/src/gcc/gcc/testsuite/gcc.target/arm/pr43920-2.c:21 613 {*thumb2_movsi_vfp} > (nil)) > > (insn 8 45 50 6 (set (reg:SI 110 [ D.4934 ]) > (reg/v:SI 111 [ startD.4917 ])) /work/src/gcc/gcc/testsuite/gcc.target/arm/pr43920-2.c:21 613 {*thumb2_movsi_vfp} > (expr_list:REG_EQUAL (const_int -1 [0xffffffffffffffff]) > (nil))) > > (insn 6 49 54 7 (set (reg:SI 110 [ D.4934 ]) > (reg/v:SI 112 [ endD.4918 ])) /work/src/gcc/gcc/testsuite/gcc.target/arm/pr43920-2.c:21 613 {*thumb2_movsi_vfp} > (expr_list:REG_EQUAL (const_int -1 [0xffffffffffffffff]) > (nil))) > > Jump2 pass, optimizing common code, was looking at notes to reason about > register values and failing to recognize those insns to be equal. I suppose you are talking about the head/tail merging code? Can you please provide a test case for problem preferably filed in Bugzilla)? Ciao! Steven