From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by sourceware.org (Postfix) with ESMTPS id 32F143858C2C for ; Fri, 8 Jul 2022 06:48:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 32F143858C2C Received: by mail-qk1-x729.google.com with SMTP id z12so15081883qki.3 for ; Thu, 07 Jul 2022 23:48:21 -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=fx9SowNE5XILezcuasnaTCttom8WzrviKEKJsTXnhu4=; b=Qft6rbmp64jEw29zs/wd/va3Is9BG4N9Tfr1aPsKk2HpThsFSDxXVY33bZiFNof2ng Ky0Qse6A0HMFadPTBW2AXqx++DtnCXR5VFrn/S7UOWvgNRE52Nli3DhGOhlSMNwR8na/ xU3Sf9zw+O15RGAo9uTd05R4stU1Bi518b6A8hZtpr9Az1RvMiMSdk93d/rC8NoXlTEb ftqLMoaD2jfZdL3oWy9JOYv7mAh7n2qGesND6MlcHWD77mA2tONgb57OjyEUty7h/DS0 eUUGf3zMxm3VANs+AwpIpA/K0rkfUHBnALclcj7iXg7Lkm3BI0f8PIPaqdWafI3p1Jop msaA== X-Gm-Message-State: AJIora85rwexS7PfZhxx/boB7Xqh/SGOoDrG+d+c1PaOMZpd6cSd6Gwo 681yfOb9HLAGg4kd6RE3bq962TvDnGVuRwyPz6lAqLrBk7Q= X-Google-Smtp-Source: AGRyM1tAq5Do59V8fjP70LV0riMO9UChYNigu0uiw5uTI1ZflYyWFrmgKY9Uph1ZSHf0T1DLc6KOplngB9fNpURThyM= X-Received: by 2002:a05:620a:2587:b0:6a7:ee6f:bf2a with SMTP id x7-20020a05620a258700b006a7ee6fbf2amr1239081qko.542.1657262900256; Thu, 07 Jul 2022 23:48:20 -0700 (PDT) MIME-Version: 1.0 References: <043a01d89220$6bb82a70$43287f50$@nextmovesoftware.com> In-Reply-To: <043a01d89220$6bb82a70$43287f50$@nextmovesoftware.com> From: Uros Bizjak Date: Fri, 8 Jul 2022 08:48:09 +0200 Message-ID: Subject: Re: [x86 PATCH] Support *testdi_not_doubleword during STV pass. To: Roger Sayle Cc: 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, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Fri, 08 Jul 2022 06:48:23 -0000 On Thu, Jul 7, 2022 at 6:41 PM Roger Sayle wrote: > > > This patch fixes the current two FAILs of pr65105-5.c on x86 when > compiled with -m32. These (temporary) breakages were fallout from my > patches to improve/upgrade (scalar) double word comparisons. > On mainline, the i386 backend currently represents a critical comparison > using (compare (and (not reg1) reg2) (const_int 0)) which isn't/wasn't > recognized by the STV pass' convertible_comparison_p. This simple STV > patch adds support for this pattern (*testdi_not_doubleword) and > generates the vector pandn and ptest instructions expected in the > existing (failing) test case. > > This patch has been tested on x86_64-pc-linux-gnu with make bootstrap > and make -k check, where with --target_board=unix{-m32} there are two > fewer failures, and without, there are no new failures. > Ok for mainline? > > > 2022-07-07 Roger Sayle > > gcc/ChangeLog > * config/i386/i386-features.cc (convert_compare): Add support > for *testdi_not_doubleword pattern (i.e. "(compare (and (not ...") > by generating a pandn followed by ptest. > (convertible_comparison_p): Recognize both *cmpdi_doubleword and > recent *testdi_not_doubleword comparison patterns. OK, I think this is the correct approach to ANDN handling. Thanks, Uros. > > Thanks in advance, > Roger > -- >