From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x929.google.com (mail-ua1-x929.google.com [IPv6:2607:f8b0:4864:20::929]) by sourceware.org (Postfix) with ESMTPS id 025B63858D39 for ; Mon, 15 Nov 2021 03:04:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 025B63858D39 Received: by mail-ua1-x929.google.com with SMTP id ay21so31792451uab.12 for ; Sun, 14 Nov 2021 19:04:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EUrj7YYkWME90M1r6cOXyt5jAvMBpCBn9t3i8Mm/oaE=; b=G3DDb0P344MmflCTsOIfXilSioLdecwf8NbXh6R4Qz8VEw3m9+W1Q5xtPG1xoI2ldx lx+JQvfUd2LQD3i1RTjByca72X72mL1MbT/DEBUsogf7jr9jwVSsR3Lu80hkJEt32meU NGAG4IuwObF3cjO6SQhVqz9umdhDL1kveIHnwMO28caseTnSS1h6MTNJCeMZpcYonins s0TwEvHX7ncue064s6xGAh3eEVAghFLR99RGTmOm+ShkHq6M+EiEAzL/E87thbtM1DfV PXOVarfX8sGzT3xkQlSdZ0pK892QzYlUuFCdFbe0QCr75yArOrpvIMgXj4qTDN78/ek4 SoIw== X-Gm-Message-State: AOAM533USmR2GrzUWIF4WM2IaqM9N+x6ushlzqLoc9V9/p8QkOTO7EKG So2gQHv4qRjqrqSsCmIwY4TLYypa3YF1bmHrZJM= X-Google-Smtp-Source: ABdhPJwJhdiTH3DiBa305NX8p4KQspT9xY+gabX/5svCGSb5pBS6A+Pv/hqBqFgmmrwb0Ke+SXY4qPnDjR3VTKV3ZO4= X-Received: by 2002:a05:6102:3a62:: with SMTP id bf2mr8476148vsb.14.1636945493682; Sun, 14 Nov 2021 19:04:53 -0800 (PST) MIME-Version: 1.0 References: <20211112152903.117525-1-hjl.tools@gmail.com> <20211112153427.GG2710@tucnak> <20211112161327.GI2710@tucnak> In-Reply-To: From: Hongtao Liu Date: Mon, 15 Nov 2021 11:11:17 +0800 Message-ID: Subject: Re: [PATCH v2] Check optab before transforming atomic bit test and operations To: "H.J. Lu" Cc: Jakub Jelinek , liuhongt , GCC Patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2021 03:04:55 -0000 On Mon, Nov 15, 2021 at 9:37 AM Hongtao Liu wrote: > > On Sat, Nov 13, 2021 at 2:21 AM H.J. Lu via Gcc-patches > wrote: > > > > On Fri, Nov 12, 2021 at 8:13 AM Jakub Jelinek wrote: > > > > > > On Fri, Nov 12, 2021 at 07:55:26AM -0800, H.J. Lu wrote: > > > > > I have following patch queued for testing for this... > > > > > > > > > > 2021-11-12 Jakub Jelinek > > > > > > > > > > PR target/103205 > > > > > * config/i386/sync.md (atomic_bit_test_and_set, > > > > > atomic_bit_test_and_complement, > > > > > atomic_bit_test_and_reset): Use OPTAB_WIDEN instead of > > > > > OPTAB_DIRECT. > > > > > > > > > > * gcc.target/i386/pr103205.c: New test. > > > > > > > > Can you include my tests? Or you can leave out your test and I can check > > > > in my tests after your fix has been checked in. > > > > > > I'd prefer the latter. > > > > > > > Here is the v2 patch on top of yours. > > > > -- > > H.J. > > It looks like there're many return; in if (!bit) branch, the those > return should never be executed since they're already guarded by > gimple_nop_atomic_bit_test_and_p, So we'd better also remove those > return; It looks like those return are used for (rhs_code == BIT_AND_EXPR) which doesn't change gimple before, so nevermind. > > -- > BR, > Hongtao -- BR, Hongtao