From patchwork Fri Oct 4 10:40:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 1992696 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XKlVQ04lWz1xt7 for ; Fri, 4 Oct 2024 20:42:22 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C8F483842FC5 for ; Fri, 4 Oct 2024 10:42:19 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id E7BA738460B4 for ; Fri, 4 Oct 2024 10:41:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E7BA738460B4 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E7BA738460B4 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728038501; cv=none; b=ZgJfr3Jewb4O2ou7UlO71EuWSvZwi4JyZv5aA74uIz2S7577kZnRqQmE1A4wdEIWk7wnGAOdj4i5gq6q8mJnig8GcSsq24JpWdUmffwIelcZiJ3iIWhAn7+bIE7UIsMufFz/ofrL9HxMqEHPnS8gVSOeptJpq5/QcITavWyG7iE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728038501; c=relaxed/simple; bh=PJK392ipTLjywzzZApFVQeWdZTjgQPjY/M4x7VTd4zU=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=SpQdgYw9oz6F6MVQAI7ZhF8n/tLC9Un+yQS6YrA9dXqW7hsj7ZV1i/rpriWltQIAPjW+xlPMTwyMCdKkOb0ijC7Ke6elKDLmcPsbs9A7G3zQufYmaB7DfSaCLiMmICQvxJlFoJYNeAujtjtEoo3QhWfs1HS/DHf4n+81HfCr5KI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 39A78497; Fri, 4 Oct 2024 03:42:09 -0700 (PDT) Received: from e121540-lin.manchester.arm.com (e121540-lin.manchester.arm.com [10.32.110.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E10103F640; Fri, 4 Oct 2024 03:41:38 -0700 (PDT) From: Richard Sandiford To: rguenther@suse.de, tamar.christina@arm.com, gcc-patches@gcc.gnu.org Cc: Richard Sandiford Subject: [PATCH 4/4] vect: Add more dump messages for VLA SLP permutation Date: Fri, 4 Oct 2024 11:40:54 +0100 Message-Id: <20241004104054.2653382-5-richard.sandiford@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241004104054.2653382-1-richard.sandiford@arm.com> References: <20241004104054.2653382-1-richard.sandiford@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-18.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_NONE, SPF_NONE, TXREP 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Taking the !repeating_p route for VLA vectors causes analysis to fail, but it wasn't clear from the dump files when this had happened, and which node caused it. gcc/ PR tree-optimization/116583 * tree-vect-slp.cc (vectorizable_slp_permutation_1): Add more dump messages. --- gcc/tree-vect-slp.cc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc index 66f5906ebb9..56fb55cb628 100644 --- a/gcc/tree-vect-slp.cc +++ b/gcc/tree-vect-slp.cc @@ -10319,10 +10319,22 @@ vectorizable_slp_permutation_1 (vec_info *vinfo, gimple_stmt_iterator *gsi, instead of relying on the pattern described above. */ if (!nunits.is_constant (&npatterns) || !TYPE_VECTOR_SUBPARTS (op_vectype).is_constant ()) - return -1; + { + if (dump_p) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "unsupported permutation %p on variable-length" + " vectors\n", (void *) node); + return -1; + } nelts_per_pattern = ncopies = 1; if (linfo && !LOOP_VINFO_VECT_FACTOR (linfo).is_constant (&ncopies)) - return -1; + { + if (dump_p) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "unsupported permutation %p for variable VF\n", + (void *) node); + return -1; + } pack_p = false; unpack_factor = 1; }