From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by sourceware.org (Postfix) with ESMTPS id B9BFC3858039 for ; Mon, 18 Sep 2023 08:19:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B9BFC3858039 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=vrull.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vrull.eu Received: by mail-pj1-x1032.google.com with SMTP id 98e67ed59e1d1-27666e94ad7so408867a91.0 for ; Mon, 18 Sep 2023 01:19:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1695025168; x=1695629968; darn=gcc.gnu.org; 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=lKcLMX8lYNClHdn0FIal6MNQnZMHuZ2IjR966B2m5nw=; b=sCF+Ev/seVudSCLn8DddfcFurXHtvEHk4YI8hG4ciCSXgsD6X1iQNoxMU6zhrru6JN Fq6P+UwSpb3njFKE+ugpM5tmHoYZ4XjaoTJWKW7raifIge5lwbUeXlSp/kMw0ioyzlrg 2h72ikp94o9gFnurueZWZUl6TtMxDl7XCQSwLgNZY3i0Rgu3X04dHG6M+vhViJarAPEq Ceydttno1YipRCxPWl32CUazQz4MjBA70dHd4Ie1+18jniVsU9yLzD3t7j4pzxpV7Msv UhzkAUrjJbRt3KKMlaouWNU7yFOC0PXNkv35geIwBbFFGID/nisQBguPTObjqRPYcn+K o3mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695025168; x=1695629968; 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=lKcLMX8lYNClHdn0FIal6MNQnZMHuZ2IjR966B2m5nw=; b=vr8xseBUdseLdgGIHwNJqTgrWCSoatYsNnFhScqzzgO/QijtW1HJtfP0OQJLOgrRUZ 73kOIGpFNsNYsiWrqCCYUfJKLk1lsnsJH6MJY4Ax+GmKv5x75t2GWFAg65iwZfy/i1OZ iTb/inN+5aENEX8FLP1iO+4ZICuPfIUtB+lwyp8nvhF6ZesitJ5BZ7tRTdI2whbM++rz 16q50xRQa4xdlbfvpKxyH4HsLjW6+QKxLfRggPnmodSvCT/sybxeO/8GsGF/2s8YwqR/ DNLyEm1e4IDk1qtoUmwqNCGcmwgBoi6e+CpR+96WsxyjO7wRsvE0jM/WHyqvWqYsUU9h a3Ag== X-Gm-Message-State: AOJu0Ywa9qUkKGwNPA3rWPKJdNGIvtGJ3zwBLsOsRrVrFOJJrhX44Hqc 7BfWjtT3DI+PzYxvPShhfnWa7bUnqmIUZ2u/MmQui7QXXrmb7k00PoA= X-Google-Smtp-Source: AGHT+IH1mI0mBct6UM/ZeDdaJiTggwfdwoJ6kGRWR4Hlz6txYDNqE9dkLlMVuYCe4fZ5YawntlMkkoE+IW1e1dFDTXc= X-Received: by 2002:a17:90a:bf85:b0:270:1614:11c7 with SMTP id d5-20020a17090abf8500b00270161411c7mr15113645pjs.2.1695025168467; Mon, 18 Sep 2023 01:19:28 -0700 (PDT) MIME-Version: 1.0 References: <20230830101400.1539313-1-manolis.tsamis@vrull.eu> In-Reply-To: <20230830101400.1539313-1-manolis.tsamis@vrull.eu> From: Manolis Tsamis Date: Mon, 18 Sep 2023 11:18:52 +0300 Message-ID: Subject: Re: [PATCH v3 0/4] ifcvt: Allow if conversion of arithmetic in basic blocks with multiple sets To: gcc-patches@gcc.gnu.org Cc: Philipp Tomsich , Robin Dapp , Jakub Jelinek , Richard Sandiford Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,JMQ_SPF_NEUTRAL,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Kind ping for V3 of these ifcvt changes https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628820.html Thanks, Manolis On Wed, Aug 30, 2023 at 1:14=E2=80=AFPM Manolis Tsamis wrote: > > > noce_convert_multiple_sets has been introduced and extended over time to = handle > if conversion for blocks with multiple sets. Currently this is focused on > register moves and rejects any sort of arithmetic operations. > > This series is an extension to allow more sequences to take part in if > conversion. The first patch is a required change to emit correct code and= the > second patch whitelists a larger number of operations through > bb_ok_for_noce_convert_multiple_sets. The third patch adds support to rew= ire > multiple registers in noce_convert_multiple_sets_1 and refactors the code= with > a new helper info struct. The fourth patch removes some old code that sho= uld > not be needed anymore. > > For targets that have a rich selection of conditional instructions, > like aarch64, I have seen an ~5x increase of profitable if conversions fo= r > multiple set blocks in SPEC benchmarks. Also tested with a wide variety o= f > benchmarks and I have not seen performance regressions on either x64 / aa= rch64. > > Some samples that previously resulted in a branch but now better use thes= e > instructions can be seen in the provided test cases. > > Bootstrapped and tested on AArch64 and x86-64. > > > Changes in v3: > - Add SCALAR_INT_MODE_P check in bb_ok_for_noce_convert_multiple_= sets. > - Allow rewiring of multiple regs. > - Refactor code with noce_multiple_sets_info. > - Remove old code for subregs. > > Manolis Tsamis (4): > ifcvt: handle sequences that clobber flags in > noce_convert_multiple_sets > ifcvt: Allow more operations in multiple set if conversion > ifcvt: Handle multiple rewired regs and refactor > noce_convert_multiple_sets > ifcvt: Remove obsolete code for subreg handling in > noce_convert_multiple_sets > > gcc/ifcvt.cc | 403 ++++++++---------- > gcc/ifcvt.h | 16 + > .../aarch64/ifcvt_multiple_sets_arithm.c | 79 ++++ > .../aarch64/ifcvt_multiple_sets_rewire.c | 20 + > 4 files changed, 290 insertions(+), 228 deletions(-) > create mode 100644 gcc/testsuite/gcc.target/aarch64/ifcvt_multiple_sets_= arithm.c > create mode 100644 gcc/testsuite/gcc.target/aarch64/ifcvt_multiple_sets_= rewire.c > > -- > 2.34.1 >