From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52616 invoked by alias); 2 Jun 2019 12:28:59 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 52601 invoked by uid 89); 2 Jun 2019 12:28:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HX-Languages-Length:730, attractive X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 02 Jun 2019 12:28:57 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x52CStdV016706; Sun, 2 Jun 2019 07:28:55 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id x52CSsmJ016705; Sun, 2 Jun 2019 07:28:54 -0500 Date: Sun, 02 Jun 2019 12:28:00 -0000 From: Segher Boessenkool To: Fredrik Hederstierna Cc: "gcc@gcc.gnu.org" Subject: Re: ARM peephole2 from 2003 never merged, still valid Message-ID: <20190602122853.GJ31586@gate.crashing.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2019-06/txt/msg00004.txt.bz2 On Sat, Jun 01, 2019 at 11:41:30PM +0000, Fredrik Hederstierna wrote: > +(define_peephole2 > + [(set (match_operand:SI 0 "arm_general_register_operand" "") > + (match_operand:SI 1 "arm_general_register_operand" "")) > + (set (reg:CC CC_REGNUM) > + (compare:CC (match_dup 0) (const_int 0)))] > + "TARGET_ARM" > + [(parallel [(set (reg:CC CC_REGNUM) (compare:CC (match_dup 1) (const_int 0))) > + (set (match_dup 0) (match_dup 1))])] > + "" > +) Hi Fredrik, Do you have a testcase for this? I wonder if it would be better handled during combine, and what that then tried; or perhaps these opportunities are created later, making a peephole a more attractive solution. Segher