From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by sourceware.org (Postfix) with ESMTPS id DB3CF3858413 for ; Wed, 19 Jul 2023 12:33:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DB3CF3858413 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-4f4b2bc1565so11544690e87.2 for ; Wed, 19 Jul 2023 05:33:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689770030; x=1692362030; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=05w/sVSd0OTkP5n4BpYe0UI5aKL428PBgLO91ulrYXU=; b=h8OuhM1F9Da0+BmqSBmppkbq9BMLRpWnqPijdg4T3NGIpcDFceufL0DlZ92PSbLbWM +z3A8/T2mg3F335Ov9FrZkL0vz9YekII1yBUwMLrgog5/pJhUOo29NVgCJudVdZkhH0Y ZIOnhf2ZXcHoGKmfJG25gbe8bo7r1gmwYHbTwrJAPuhkIx9rIq6mO01xoGOmyURo/Czk LMkiwScTtKVv5hvWaqhSKF1pBpBEf4FKE/gX+ue580GpJEunmyU0p31op0Wfqz32cBm3 BnvqFQdZqEB3GNMtNBcCGcwPy+07uYI391jOsa4v2tzXxwByweVwkDMpC+TGtiu3NEUB SJHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689770030; x=1692362030; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=05w/sVSd0OTkP5n4BpYe0UI5aKL428PBgLO91ulrYXU=; b=lwB1onhufOvW/adEGi8gnlyErSpBC6kHs0FJhvLx0b+w0Na/yOZTHad2LlXJWMeg5l lVJLTajMm5X3PcCTxd7AoprbwGMfVklFYoi4mpnbTNIstkyP2LE2izam1iRZoPXeqyMM zlNl7NVyIiECEu0yHSbtJ/nUWY4mHNzmKUMxlHWPPpChUhJi4nIwyn1BvDr0+cnK6Gzy Mg+/P2HxQ81PFmA3LpBZeZdTenZt3Je9M85Vjk506IfireXzdNUecI0+5p5oBCpxFvty 01b0snegpyar7Xao8hRgdfPEjvTlNPsZxoEGelFsXUxEUpvOmsATT23qim97sbvtOcXD VXAQ== X-Gm-Message-State: ABy/qLYTxqe1B7JiereV9m/vInL7go5tVAwMoMFPESiGr0O9uy7FYddb HMg4xFgH5PiHd2oa4q49A7vRwq9vMhUE+kwTSUaakfbH1UU= X-Google-Smtp-Source: APBJJlHAFeSDWdKdFr8CNBfeiysGWvypelUtkRWr2RLix90cVY0CKY9GiCrU0udA7ImSVlPgij8KD4J6oMMAuOZxdV4= X-Received: by 2002:a05:6512:2312:b0:4f8:70b8:12b1 with SMTP id o18-20020a056512231200b004f870b812b1mr4748915lfu.4.1689770030087; Wed, 19 Jul 2023 05:33:50 -0700 (PDT) MIME-Version: 1.0 References: <03bd01d99bee$888f3a70$99adaf50$@nextmovesoftware.com> In-Reply-To: From: Uros Bizjak Date: Wed, 19 Jul 2023 14:33:38 +0200 Message-ID: Subject: Re: [GCC 13 PATCH] PR target/109973: CCZmode and CCCmode variants of [v]ptest. To: Richard Biener Cc: Roger Sayle , gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.5 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, Jul 19, 2023 at 2:21=E2=80=AFPM Richard Biener wrote: > > On Sun, Jun 11, 2023 at 12:55=E2=80=AFAM Roger Sayle wrote: > > > > > > This is a backport of the fixes for PR target/109973 and PR target/1100= 83. > > > > This backport to the releases/gcc-13 branch has been tested on > > x86_64-pc-linux-gnu with make bootstrap and make -k check, both with an= d > > without --target_board=3Dunix{-m32} with no new failures. Ok for gcc-1= 3, > > or should we just close PR 109973 in Bugzilla? > > As alternative solution for the GCC 13 branch I have tested reverting > r13-2006-ga56c1641e9d25e successfully. Can we choose between the > options please? Sorry I'm only bringing this up now but 13.2 RC is due > tomorrow. > > Thank you, > Richard. > > > > > > > 2023-06-10 Roger Sayle > > Uros Bizjak > > > > gcc/ChangeLog > > PR target/109973 > > PR target/110083 > > * config/i386/i386-builtin.def (__builtin_ia32_ptestz128): Use = new > > CODE_for_sse4_1_ptestzv2di. > > (__builtin_ia32_ptestc128): Use new CODE_for_sse4_1_ptestcv2di. > > (__builtin_ia32_ptestz256): Use new CODE_for_avx_ptestzv4di. > > (__builtin_ia32_ptestc256): Use new CODE_for_avx_ptestcv4di. > > * config/i386/i386-expand.cc (ix86_expand_branch): Use CCZmode > > when expanding UNSPEC_PTEST to compare against zero. > > * config/i386/i386-features.cc (scalar_chain::convert_compare): > > Likewise generate CCZmode UNSPEC_PTESTs when converting compari= sons. > > Update or delete REG_EQUAL notes, converting CONST_INT and > > CONST_WIDE_INT immediate operands to a suitable CONST_VECTOR. > > (general_scalar_chain::convert_insn): Use CCZmode for COMPARE > > result. > > (timode_scalar_chain::convert_insn): Use CCZmode for COMPARE re= sult. > > * config/i386/i386-protos.h (ix86_match_ptest_ccmode): Prototyp= e. > > * config/i386/i386.cc (ix86_match_ptest_ccmode): New predicate = to > > check for suitable matching modes for the UNSPEC_PTEST pattern. > > * config/i386/sse.md (define_split): When splitting UNSPEC_MOVM= SK > > to UNSPEC_PTEST, preserve the FLAG_REG mode as CCZ. > > (*_ptest): Add asterisk to hide define_insn. Rem= ove > > ":CC" mode of FLAGS_REG, instead use ix86_match_ptest_ccmode. > > (_ptestz): New define_expand to specify CCZ. > > (_ptestc): New define_expand to specify CCC. > > (_ptest): A define_expand using CC to preserve th= e > > current behavior. > > (*ptest_and): Specify CCZ to only perform this optimizati= on > > when only the Z flag is required. > > > > gcc/testsuite/ChangeLog > > PR target/109973 > > PR target/110083 > > * gcc.target/i386/pr109973-1.c: New test case. > > * gcc.target/i386/pr109973-2.c: Likewise. > > * gcc.target/i386/pr110083.c: Likewise. Yes, I would rather have the offending patch reverted on gcc-13. Uros.