Message ID | 20230701092413.2488806-1-manolis.tsamis@vrull.eu |
---|---|
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp10931215vqr; Sat, 1 Jul 2023 02:43:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlEkSR12VXa4DKzASUKVdnYXr/w7m87X5tmjrRMwQeBleUNBv7gx1soMDMSbYjte4udMXAyR X-Received: by 2002:a17:906:72d8:b0:97e:aad0:12fe with SMTP id m24-20020a17090672d800b0097eaad012femr4002080ejl.77.1688204632390; Sat, 01 Jul 2023 02:43:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688204632; cv=none; d=google.com; s=arc-20160816; b=ZTATxmJVeaLwiIsyqg1WCdQ9cC7d+LV6AoVrzLYmpZZkH1uqykOWwwKI6/AS0MT/FR oShelQm2RT+Qkl44zmeVEUborvX0/5OXZ929bQFcpjcVRlCzRPOeoOY3wobt3EZXF/kN 1z+nXYrhIDI5+Q3CpZ3X2CnXj98EaAA3Uw7uewjV3Cj/g6jd5+baTPTaJWPQ2CJFXkQr NFROwBvmL6+hY200lfSOgt8i1KXzY08sXj7kTURkl9p1G3nNH7Xa1fNKtJ4OMt3nt3xT FTGVgJFhzYCDdon3jyaTXIfDavregAzmQ1Y3V9jp1fJqeh5dOD+rf2UkBEVw11O0I1cC /x1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :dmarc-filter:delivered-to; bh=hud2iqoPjkZt5/AH5htiSQfYIeqyz5MyMflcAcmVMog=; fh=7w0UefePDgmICL7PqrzMz20pJFq64xCaBLNrSa0cpnQ=; b=TWmOq28C3kH1XmLkZ4Sh/WphCjEMC/2d0uVC6VGn8PzVo2TsgDIgq1XO1n/EN6GyhC dY7XRoEwR8DiLSVEgPtaymfPU9x/d6CtGOqR8NotDRXVkFQUoGHk1Vdi2mieSe3FvRBm 0+AyppmkRKy/iiKp5g6MtEOGWg6sFxkTtFc7wl8b0VnveS7cqYUsmhP4z4g7XKpMx71q 4p+ruReArrFbEcafQP3JhpAeUvURn3gl/9Mf289Joa0NwAgh9v411tikzYcPLLpAmm0W K3321AXuF4xT5+ddEwUiYHorvyGLNhMorU344ciD+Y0kxIjs1RMEj4fUpgMfINpPUehy eFVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@vrull.eu header.s=google header.b=Rdydb+uU; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id bu2-20020a170906a14200b0097885fd66f4si9241834ejb.162.2023.07.01.02.43.52 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jul 2023 02:43:52 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@vrull.eu header.s=google header.b=Rdydb+uU; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2AB303853D0F for <ouuuleilei@gmail.com>; Sat, 1 Jul 2023 09:43:11 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by sourceware.org (Postfix) with ESMTPS id D9B9B385841E for <gcc-patches@gcc.gnu.org>; Sat, 1 Jul 2023 09:42:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D9B9B385841E 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-lf1-x12a.google.com with SMTP id 2adb3069b0e04-4fba8f2197bso1193474e87.3 for <gcc-patches@gcc.gnu.org>; Sat, 01 Jul 2023 02:42:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1688204563; x=1690796563; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=hud2iqoPjkZt5/AH5htiSQfYIeqyz5MyMflcAcmVMog=; b=Rdydb+uUpbrJS9CjBPds0FwdXZpnbOzzyoDajCv8XhVIJO21Q4e5kJkKVA8SSSHgNr XEMKqs9MDS2EtQEaQEf1hlAYKGaxs3e7/++EU9xq0zZ7OryReGujKFbR/ROXmvCxuO9s LvpcUlPSg0vyVStpWta58tzqJ9HajnV4Y6vX4BEn02R7BVWnn3OWa22oyOeTnRgbHxOe luYznMXSKMAENAYdgGxbXDso15i8Z9ZKpM7C9bPvKXH7RjFhn0cc1rxabgeom/8wEQmW T9CAu3WR2Sr0rkGxwGezgq2F9vdkX6drPAZeoiOj8zutrnp/QFoqAc0pCE/lWrsk4A2C 9CVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688204563; x=1690796563; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hud2iqoPjkZt5/AH5htiSQfYIeqyz5MyMflcAcmVMog=; b=J3XqlYvNr6K9fBxNUN5uRKKtlgRBr0pfQ/6/p+uWAO+Xh0mXYq9Pz+5Gt3frcG4BTy 1s845FQCBLlvWnl8eN8XyfP0f3kQ8ZpfHJV4dBBnxlwguAd5SJriG2wmNaFFGjBFTU3x wz8ZhzOyoh+ps2mwZ602J7DV1qddVAPW5w6kD7PWi/BbxhF9X1aQB7wZ9UUWRVuvUEvf oCUIQYy2QuC6sO9qdVJSnOoFMFncReDtspr5XiW1hZcPQRD3FYxmIlWGR3HmRXu6tsr4 uKXNFNAC8P3e1LgGOp6QjdOZECeUSX9WbmvjPBVyFln6bktd1MOzs9li71lGxc2TnUJD NKaw== X-Gm-Message-State: ABy/qLbz4AY3T1lmuclPi+9aLg9lZbny4OG5K1noqswLYZB3FptovRln SGubwuNLBdQu7ntT1NB1XubDi3Lx6WdaCGM8a9VgwA== X-Received: by 2002:ac2:5f74:0:b0:4fb:a0f1:f8b8 with SMTP id c20-20020ac25f74000000b004fba0f1f8b8mr3389997lfc.63.1688204563461; Sat, 01 Jul 2023 02:42:43 -0700 (PDT) Received: from helsinki-03.engr ([2a01:4f9:6b:2a47::2]) by smtp.gmail.com with ESMTPSA id d27-20020ac244db000000b004f27471e0aesm3296374lfm.79.2023.07.01.02.42.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jul 2023 02:42:43 -0700 (PDT) From: Manolis Tsamis <manolis.tsamis@vrull.eu> To: gcc-patches@gcc.gnu.org Cc: Jakub Jelinek <jakub@redhat.com>, Philipp Tomsich <philipp.tomsich@vrull.eu>, Robin Dapp <rdapp@linux.ibm.com>, Andrew Pinski <apinski@marvell.com>, Manolis Tsamis <manolis.tsamis@vrull.eu> Subject: [PATCH 0/2] ifcvt: Allow if conversion of arithmetic in basic blocks with multiple sets Date: Sat, 1 Jul 2023 11:24:11 +0200 Message-Id: <20230701092413.2488806-1-manolis.tsamis@vrull.eu> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.4 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, T_SCC_BODY_TEXT_LINE autolearn=no 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770210860436491346?= X-GMAIL-MSGID: =?utf-8?q?1770210860436491346?= |
Series |
ifcvt: Allow if conversion of arithmetic in basic blocks with multiple sets
|
|
Message
Manolis Tsamis
July 1, 2023, 9:24 a.m. UTC
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. For targets that have a rich selection of conditional instructions, like aarch64, I have seen an ~5x increase of profitable if conversions for multiple set blocks in SPEC benchmarks. Also tested with a wide variety of benchmarks and I have not seen performance regressions on either x64 / aarch64. Some samples that previously resulted in a branch but now better use these instructions can be seen in the provided test case. Tested on aarch64 and x64; On x64 some tests that use __builtin_rint are failing with an ICE but I believe that it's not an issue of this change. force_operand crashes when (and:DF (not:DF (reg:DF 88)) (reg/v:DF 83 [ x ])) is provided through emit_conditional_move. Manolis Tsamis (2): ifcvt: handle sequences that clobber flags in noce_convert_multiple_sets ifcvt: Allow more operations in multiple set if conversion gcc/ifcvt.cc | 109 ++++++++++-------- .../aarch64/ifcvt_multiple_sets_arithm.c | 67 +++++++++++ 2 files changed, 127 insertions(+), 49 deletions(-) create mode 100644 gcc/testsuite/gcc.target/aarch64/ifcvt_multiple_sets_arithm.c