From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) by sourceware.org (Postfix) with ESMTPS id B1B373858C78 for ; Sun, 13 Mar 2022 17:41:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B1B373858C78 Received: by mail-qk1-x72d.google.com with SMTP id q194so11087790qke.5 for ; Sun, 13 Mar 2022 10:41:19 -0700 (PDT) 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=IlaAsCuhaVKZcGdpVzmef4KdfE9bsm0nLFpBUJ+6v8Y=; b=U7f5cIS2Kzro3YGXNDJ5Jq/lETwSmJMfjFYl2pcfi08CXyOw5oYB7p0zy6f0BDPyl0 XiL0tybEX4NQVpwagJeg98pb25iorfPEOFOdYZCM5eeldi1j6/X1/DP+Z3kZ7HreMnBp Y8TAuJfD2/9yT33SGqrBxKLTqUWMQhU5fbd2uq7xmFVBFYjjYrf5JhKm1uZe4j+uhCDy nzg2TrQaCLMzyh7Ghp6UKrTjijMKoBLwpe7DM8Y/3WToEBCegvTRnmEJHfb/3FEeafi/ B7uLePmy6UmRWrCJdo6BhEPcQCpz983+eODW7yjDpaf+Urze8Yxs/aRnrN+AmlKaJP06 MQ8A== X-Gm-Message-State: AOAM533wktzuJsb3I4/2sLuBf4FxkiNje2K82M8vSIeel4x7bw+MLxRK xspVMbBNjE+Xpk1r90ZhqAsx2NRjPmXHaBs4yBtxbD2+pjGmSg== X-Google-Smtp-Source: ABdhPJz/e1PlXoqOAEt6HXwvgGp3C8/MWqDQetK41Q8ssaQ1/DkJgv0bZJBhM/wdSFaFT7e8pRGComyspLqTWpSc8B8= X-Received: by 2002:a05:620a:2993:b0:67d:7116:a642 with SMTP id r19-20020a05620a299300b0067d7116a642mr9111185qkp.180.1647193278948; Sun, 13 Mar 2022 10:41:18 -0700 (PDT) MIME-Version: 1.0 References: <003401d83642$0b222c40$216684c0$@nextmovesoftware.com> In-Reply-To: <003401d83642$0b222c40$216684c0$@nextmovesoftware.com> From: Uros Bizjak Date: Sun, 13 Mar 2022 18:41:07 +0100 Message-ID: Subject: Re: [x86 PATCH] Fix libitm.c/memset-1.c test fails with new peephole2s. To: Roger Sayle Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.4 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, T_SCC_BODY_TEXT_LINE 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: Sun, 13 Mar 2022 17:41:23 -0000 On Sat, Mar 12, 2022 at 7:50 PM Roger Sayle wrote: > > > My sincere apologies for the breakage, but alas handling SImode in the > recently added "xorl;movb -> movzbl" peephole2 turns out to be slightly > more complicated that just using SWI48 as a mode iterator. I'd failed > to check the machine description carefully, but the *zero_extendsi2 > define_insn is conditionally defined, based on x86 target tuning using > TARGET_ZERO_EXTEND_WITH_AND, and therefore unavailable on 486 and pentium > unless optimizing the code for size. It turns out that the libitm testsuite > specifies -m486 with make check RUNTESTFLAGS="--target_board='unix{-m32}'" > and therefore encounters/catches my oversight. > > Fixed by adding the appropriate conditions to the new peephole2 patterns. > It don't think it's worth the effort to provide an equivalent optimization > for > these (very) old architectures. > > Tested on x86_64-pc-linux-gnu with make bootstrap and make -k check > with no new failures. Confirmed using RUNTESTFLAGS that this > fixes the above failure, and the recently added testcase with -march=i486. > Ok for mainline? > > > 2022-03-12 Roger Sayle > > gcc/ChangeLog > * config/i386/i386.md (peephole2 xorl;movb -> movzbl): Disable > transformation when *zero_extendsi2 is not available. > > gcc/testsuite/ChangeLog > * gcc.target/i386/pr98335.c: Skip this test if tuning for i486 > or pentium, and not optimizing for size. OK, but please use: mode != SImode instead of != 4 Thanks, Uros.