From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id 1426F3857C52 for ; Fri, 14 Aug 2020 17:47:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1426F3857C52 Received: by mail-oi1-x22c.google.com with SMTP id u63so8828915oie.5 for ; Fri, 14 Aug 2020 10:47:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aDsz5jYB2Ey1bswrbsXvCrxDAxoY+APQ+jYPfwiASDM=; b=ry9w76v6tqiS5Q0EJGjc+17zi5XvEXO1GR+oBtWFSzQ8FCUC5umF9hcehJu5rIreul Mb1jCFq3jN3Fzfo9cBroDcHQXbVlVvOQqOyU1uby2kvKGpQOCSBpouELACq1ROkY5JTm N+wrhGEXJdrFWxjgLgm5QdoDvz7dfoM090Ys8PDFeXMhGlQ0l8gCnZHIepHZEOryODXN dBVIZLbVQxarHPpwhrgZAJVrl3sjDZuCGCgs4tT0R+rfLoVOyRr67240QIK5smw5mg3I 0bsXY4kXfyRU8SQTqDHyDTJjJqGzMrwp3Cwnh4DO5PAFoWBTYy0l9Dq0sZ4un3xo4waq PaBQ== X-Gm-Message-State: AOAM530m5bXShAYQKHWaCl7dF6+CiQCZTROqVXsfZEVAUWwlal4TrgMi x8gEBjSqcjMW3RYm6HmqM0ExyU1e0W5LTDFByF8= X-Google-Smtp-Source: ABdhPJxosMjk9ZC8yrloWtQ54tgXzZO9GySjUq1ZWGaJ3b+LfmByvfWsvT6fFi8ggecBOUjJAO0CI3DGX7FgOMVA0K4= X-Received: by 2002:aca:ed4e:: with SMTP id l75mr2330703oih.44.1597427258365; Fri, 14 Aug 2020 10:47:38 -0700 (PDT) MIME-Version: 1.0 References: <87o8nd1npw.fsf@gcc.gnu.org> <20200814162307.GM6753@gate.crashing.org> In-Reply-To: <20200814162307.GM6753@gate.crashing.org> From: Pip Cet Date: Fri, 14 Aug 2020 17:47:02 +0000 Message-ID: Subject: Re: Clobber REG_CC only for some constraint alternatives? To: Segher Boessenkool Cc: Senthil Kumar Selvaraj , gcc@gcc.gnu.org, ebotcazou@adacore.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2020 17:47:40 -0000 On Fri, Aug 14, 2020 at 4:24 PM Segher Boessenkool wrote: > On Fri, Aug 14, 2020 at 04:46:59PM +0530, Senthil Kumar Selvaraj via Gcc wrote: > > (define_insn "*mov_insn_noclobber_flags" > > [(set (match_operand:ALL1 0 "nonimmediate_operand" "=r,d ,q,r") > > (match_operand:ALL1 1 "nox_general_operand" "r,n Ynn,r,q")) > > (clobber (const_int 0))] > > This is not correct, clobbers like that are not defined RTL, and are > actually used internally (by combine at least), so this will confuse > that. > > If you want to say some alternative does not clobber anything, just use > the constraint "X" for that alternative. Just to clarify, such clobbers would still show up in RTL, right? Because some passes, such as cmpelim, do not currently appear to deal very well with extra clobbers, so that might be a problem. What I'm currently doing is this: (define_split [(set (match_operand 0 "nonimmediate_operand") (match_operand 1 "nox_general_operand"))] "reload_completed && mov_clobbers_cc (insn, operands)" [(parallel [(set (match_dup 0) (match_dup 1)) (clobber (reg:CC REG_CC))])]) which, if I understand correctly, introduces the parallel-clobber expression only when necessary, at the same time as post-reload splitters introduce REG_CC references. Is that correct? Thanks Pip