From patchwork Fri Mar 1 10:43:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 208764 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp990395dyb; Fri, 1 Mar 2024 02:44:50 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUEe9KkKA8i5EeQzyspCCmh3gKaNB/dWLKL14DIhibVYvOHoeKgPAzg3fMbOp75iu85qBx1aYGRKIJNfAwfp7rGa1Z7sQ== X-Google-Smtp-Source: AGHT+IGhcxK6BlHURkrzIxnc+qroXhZTgpx0syS7DG/nA9a8blk71bEO+YpX9aAPbI1jGXECMsKo X-Received: by 2002:a25:dbd1:0:b0:dcd:5bfa:8184 with SMTP id g200-20020a25dbd1000000b00dcd5bfa8184mr927694ybf.39.1709289889797; Fri, 01 Mar 2024 02:44:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709289889; cv=pass; d=google.com; s=arc-20160816; b=GeGmCTn3YBzJu7ouJIniaeVNJeM1PmnwY4CF+ZOVQ0iE4jf3Iwb++M9oDbZ31Vl77X NRdKjAS0ITrI1BhZrlv1S/ojbJlnVj5jqGdap9KXsbKpgXDDe3VskBJQpNIg14JbCrtd XYdVgTaLPCxBt+Edura9f+TnAD8kNdMZdNF3hivdr2PsHwRpJ/46B8JbbzJOel5/oi58 sv9AthSQxDvcXC2v4DqAFx2CSQo0QGLhLWKFLa7V+rESi5BiCda610y2uXKrtMnEmeob w91ptuTCKtrNuneRhwqVZpbcdfeHwIpRqqy/HdlR9dDR+mtE0gznBq7TY7W2WsdCXlaK 5+Uw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:message-id:mime-version:subject :to:from:date:dkim-signature:dkim-signature:dkim-signature :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=xVtR2M00k6efX1tpGxkyhswPcAqH1nvj3DANJQN9Sow=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=yrV4uG/npBIzKgSyqsdsblpV3iAOqMqNKqko9mXRkdyaABMSRaz0cxPSTnNVC2A1cP 0QHkcukV1Zl0KeZWCPi+32h0a4V8eBmVGQP7SFLJpL29CFHVMMc1DP1G5d0nvDMGd0Fs NRw0ZBTA/nnAwfbjUIAwfAHUBDkQl/bOsrQ3vBd6U5lxsRSxh5MrCutA7JXhVKnHCZ6D f9yv/T2yPf4KycnWuiNFfi+ekMDUTw51/4wxk7Vna2v+CvgBtfYK4AWvAm/6aet341Nn LguDLAuWIoPV+HenpuS05tZ49wiS/qc4Aen9mQ/iXcC9Qv7KXg0V63LHQBxUtFkFaY9K GKyQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=JGHewqWa; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=JGHewqWa; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=8B5W5TTA; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id v2-20020a05622a188200b0042dd04fe2b7si3627242qtc.294.2024.03.01.02.44.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 02:44:49 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=JGHewqWa; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=JGHewqWa; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=8B5W5TTA; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0CBEC3858C32 for ; Fri, 1 Mar 2024 10:44:49 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by sourceware.org (Postfix) with ESMTPS id D2FAE3858D39 for ; Fri, 1 Mar 2024 10:43:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D2FAE3858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D2FAE3858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709289840; cv=none; b=Bd6YujUqdIQ6N1DWKvkrPcUf+8T6sAYR2wbUolt13OnGohG0AsVU+M4e22Mg5bwinpjeM4U1K45WZZcXbQDPNpw2hkXOv1d/eQ+ErkY8+mYojs/IEHfp2immb9OdK4sp0O9gwf+fPryzH7TfRDC0RBKCqoaqGCGROhbA/rDyJYQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709289840; c=relaxed/simple; bh=+dlmhOme0HYaLgg0WUwq3ZUP0/sQTH3nI1b99mafWek=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:Date: From:To:Subject:MIME-Version:Message-Id; b=aNFry6gcXR3LgtaWZ24xdpqC2hJghcQr39IfR2u4bJ4S1gIfn8WXAUtH61jBmA5qM55D6Nn39WdoiRob6w+FsFxiLAgpj+jbDjFhzivxh34aoqYS7icpYPTyRjwIE59jUwYx9xV3jDtw2a5TK62ooInADKf/oMGEM1k6iKEuATs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 388F73372C for ; Fri, 1 Mar 2024 10:43:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1709289835; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=xVtR2M00k6efX1tpGxkyhswPcAqH1nvj3DANJQN9Sow=; b=JGHewqWaBn295vAj0a3294WFKfxdWB5mMArXe2YeDukm+TLN6MioH5cL1vxodSw+9u44vI 8LhzG30FK0OD4w5QmiSB21qIcD5Uap+/dV3aQxVxJAIjKyv7lNyCPgDx/0ydrZSTawhud4 zs4GUsDQ4Orop5h9UmLXSO+A1UYHhlI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1709289835; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=xVtR2M00k6efX1tpGxkyhswPcAqH1nvj3DANJQN9Sow=; b=8B5W5TTAP2V1au9Bh/70SVnafAbqWjlPz5y7tSU3rRDL/Wdm7orOefEhNcyupRszuwR7Ar SlCG7MPZNi3mC5Bg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1709289835; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=xVtR2M00k6efX1tpGxkyhswPcAqH1nvj3DANJQN9Sow=; b=JGHewqWaBn295vAj0a3294WFKfxdWB5mMArXe2YeDukm+TLN6MioH5cL1vxodSw+9u44vI 8LhzG30FK0OD4w5QmiSB21qIcD5Uap+/dV3aQxVxJAIjKyv7lNyCPgDx/0ydrZSTawhud4 zs4GUsDQ4Orop5h9UmLXSO+A1UYHhlI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1709289835; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=xVtR2M00k6efX1tpGxkyhswPcAqH1nvj3DANJQN9Sow=; b=8B5W5TTAP2V1au9Bh/70SVnafAbqWjlPz5y7tSU3rRDL/Wdm7orOefEhNcyupRszuwR7Ar SlCG7MPZNi3mC5Bg== Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 1F15C13A39 for ; Fri, 1 Mar 2024 10:43:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id Z4X3BWux4WUnKAAAn2gu4w (envelope-from ) for ; Fri, 01 Mar 2024 10:43:55 +0000 Date: Fri, 1 Mar 2024 11:43:54 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] tree-optimization/114164 - unsupported SIMD clone call, unsupported VEC_COND MIME-Version: 1.0 Message-Id: <20240301104355.1F15C13A39@imap2.dmz-prg2.suse.org> X-Spam-Level: Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=JGHewqWa; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=8B5W5TTA X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.51 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:98:from]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[gcc-patches@gcc.gnu.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+]; MX_GOOD(-0.01)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[99.99%] X-Spam-Score: -4.51 X-Rspamd-Queue-Id: 388F73372C X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792320355218999171 X-GMAIL-MSGID: 1792320355218999171 The following avoids creating unsupported VEC_COND_EXPRs as part of SIMD clone call mask argument setup during vectorization which results in inefficient decomposing of the operation during vector lowering. Bootstrapped and tested on x86_64-unknown-linux-gnu. Will push on Monday when arm CI is happy. Richard. PR tree-optimization/114164 * tree-vect-stmts.cc (vectorizable_simd_clone_call): Fail if the code generated for mask argument setup is not supported. --- gcc/tree-vect-stmts.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index be0e1a9c69d..14a3ffb5f02 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -4210,6 +4210,16 @@ vectorizable_simd_clone_call (vec_info *vinfo, stmt_vec_info stmt_info, " supported for mismatched vector sizes.\n"); return false; } + if (!expand_vec_cond_expr_p (clone_arg_vectype, + arginfo[i].vectype, ERROR_MARK)) + { + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, + vect_location, + "cannot compute mask argument for" + " in-branch vector clones.\n"); + return false; + } } else if (SCALAR_INT_MODE_P (bestn->simdclone->mask_mode)) {