| Message ID | 20251205170158.1742149-1-konstantinos.eleftheriou@vrull.eu |
|---|---|
| Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5FB894C900C0 for <patchwork@sourceware.org>; Fri, 5 Dec 2025 16:54:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5FB894C900C0 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=vrull.eu header.i=@vrull.eu header.a=rsa-sha256 header.s=google header.b=iOO2JC6X X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) by sourceware.org (Postfix) with ESMTPS id 0489D4C515F0 for <gcc-patches@gcc.gnu.org>; Fri, 5 Dec 2025 16:53:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0489D4C515F0 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=vrull.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vrull.eu ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0489D4C515F0 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.218.48 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1764953624; cv=none; b=nw8o+hcA4FFu++JbIhd3F+o5vrqoC1R8uNSqLMs2sX17WCKqf/TZaQrim/PlpbHsKNcjf9uMXNqb69OMQt+MD/cTN4suvzWWHHrBvOPbfvgxqP//vZTrdvv1W74V3AljHG99+E+wMmS4z4CjvcWKRpEqOYtjE9SOiYj0lRg4wyg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1764953624; c=relaxed/simple; bh=99Qf21Lriiv5SpC2lo73eysK5/POyLSY+z0TpGg2Q08=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ea6o93W7uaG0JHjqWBb8FaXjAEYwkFgvlhOXMvSsyYom05wgMVwvRyXXAWC9qTBIhSJfqitafcJNXcdPb8CDCtKE275Ju0fMyPeDw1wyexZXt8xUljcUlTH9pTautQStHWA8q6hWfwqLFGfu3U6f7nrO60V79uFPfr45iO4c4FY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0489D4C515F0 Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-b75c7cb722aso321413966b.1 for <gcc-patches@gcc.gnu.org>; Fri, 05 Dec 2025 08:53:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1764953623; x=1765558423; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=QTzB0ErYQ4TxwlPs7e6S4VMtmjVus0y+2tqUKhoxTAc=; b=iOO2JC6XtDukQ8VlZzEn8vacnCWx07C8erYXN1Tg3nJJRGnMnlUzaOYeWEXgpCO3m7 ci/TTuWfiqX1KwfflgDQPl9eoqMOvDvwiFaNY6pgTzAeyh6E4bV+ElrQuU22FHlAxXSb SwmR5ZoqQQsidGPct1UOl6AAjicpspU6hTtfoley+6zsvDcNMv2lj6NW7feg67ELViTP JgZ+onGywyx5zJiGtoj8k5xlYUgF2Gc8jkU6dlf4VzMMic6bA3pCHUkZhAN77+bBhq7x 9OnEf6a6NB0m3KD4UFnn8EwYakhOfM3m15MHgVcqDk85I89sVi6JsUanlSKYIdk3kZmr oV1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764953623; x=1765558423; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=QTzB0ErYQ4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-Smtp-Source: AGHT+IH7AdRyzW4qREmIjoBa5U1K2/C8euBSxqvXW8aVzyeIjzDjG1q2OiCSsCuuuE8oBAZnh9ryMg== X-Received: by 2002:a17:907:97d5:b0:b73:6f8c:6127 with SMTP id a640c23a62f3a-b79dbe5ae11mr1060321766b.12.1764953622604; Fri, 05 Dec 2025 08:53:42 -0800 (PST) Received: from ampereone1.sec.univie.ac.at (ampereone1.sec.univie.ac.at. [131.130.126.106]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b79f4a558b3sm418097266b.69.2025.12.05.08.53.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Dec 2025 08:53:42 -0800 (PST) From: Konstantinos Eleftheriou <konstantinos.eleftheriou@vrull.eu> To: gcc-patches@gcc.gnu.org, Philipp Tomsich <philipp.tomsich@vrull.eu> Cc: Richard Biener <rguenther@suse.de>, Andrew Pinski <pinskia@gmail.com>, Konstantinos Eleftheriou <konstantinos.eleftheriou@vrull.eu> Subject: [PATCH 0/2] Enable ccmp generation on comparisons leading to equal blocks [PR102793] Date: Fri, 5 Dec 2025 18:01:45 +0100 Message-ID: <20251205170158.1742149-1-konstantinos.eleftheriou@vrull.eu> X-Mailer: git-send-email 2.51.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 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~patchwork=sourceware.org@gcc.gnu.org |
| Series |
Enable ccmp generation on comparisons leading to equal blocks [PR102793]
|
|
Message
Konstantinos Eleftheriou
Dec. 5, 2025, 5:01 p.m. UTC
This patch series updates the tail-merging pass so that sequential comparisons leading to equal blocks can be merged, allowing the generation of a ccmp instruction on targets that support it. We needed to use ifcombine's `same_phi_args_p` and `recognize_if_then_else` functions. So, a new header file 'tree-ssa-ifcombine.h', with the functions' prototypes, has been added and 'static' has been removed from the function signatures in 'ifcombine'. Bootstrapped/regtested on AArch64 and x86_64. Konstantinos Eleftheriou (2): ifcombine: Add tree-ssa-ifcombine.h and update function signatures tail-merge: Combine sequential comparisons leading to the merged block gcc/testsuite/gcc.dg/guality/pr54693-2.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/pr102793-1.c | 50 ++++ gcc/testsuite/gcc.dg/tree-ssa/pr102793-2.c | 51 ++++ gcc/tree-ssa-ifcombine.cc | 7 +- gcc/tree-ssa-ifcombine.h | 28 +++ gcc/tree-ssa-tail-merge.cc | 258 +++++++++++++++++++++ 6 files changed, 392 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr102793-1.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr102793-2.c create mode 100644 gcc/tree-ssa-ifcombine.h
Comments
That's an alternative for https://gcc.gnu.org/pipermail/gcc-patches/2024-April/648856.html, based on the feedback. Konstantinos. On Fri, Dec 5, 2025 at 6:53 PM Konstantinos Eleftheriou < konstantinos.eleftheriou@vrull.eu> wrote: > > This patch series updates the tail-merging pass so that sequential > comparisons > leading to equal blocks can be merged, allowing the generation of a ccmp > instruction on targets that support it. > > We needed to use ifcombine's `same_phi_args_p` and `recognize_if_then_else` > functions. So, a new header file 'tree-ssa-ifcombine.h', with the > functions' > prototypes, has been added and 'static' has been removed from the function > signatures in 'ifcombine'. > > Bootstrapped/regtested on AArch64 and x86_64. > > > Konstantinos Eleftheriou (2): > ifcombine: Add tree-ssa-ifcombine.h and update function signatures > tail-merge: Combine sequential comparisons leading to the merged block > > gcc/testsuite/gcc.dg/guality/pr54693-2.c | 2 +- > gcc/testsuite/gcc.dg/tree-ssa/pr102793-1.c | 50 ++++ > gcc/testsuite/gcc.dg/tree-ssa/pr102793-2.c | 51 ++++ > gcc/tree-ssa-ifcombine.cc | 7 +- > gcc/tree-ssa-ifcombine.h | 28 +++ > gcc/tree-ssa-tail-merge.cc | 258 +++++++++++++++++++++ > 6 files changed, 392 insertions(+), 4 deletions(-) > create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr102793-1.c > create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr102793-2.c > create mode 100644 gcc/tree-ssa-ifcombine.h > > -- > 2.51.1 > >