From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 9E83B3858D35 for ; Tue, 4 Jul 2023 12:10:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9E83B3858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id D658321AFB; Tue, 4 Jul 2023 12:10:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1688472654; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6wg7dFE2m3B4UZ72CIVXDWxOCfa8ulOC66nAitE1k18=; b=gVw+XIAMnuQCLwNEj46bR7B8/uAqZGovtBycVC0mVhufxzrPp4ru//uQPspLLjHyPhGbBt dFxqGMm3fX3wKNKk16a3ynlomAPC8gRAhU4mPU9HL5yzd0VdUggbPlr5SWFjQUbphafEQN wzIUIBq2SNwJt20OPJOEjO6cOGLzo+Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1688472654; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6wg7dFE2m3B4UZ72CIVXDWxOCfa8ulOC66nAitE1k18=; b=KLiP6eVeXVOM4qsKto9CQ45jeE8TlTXngnPmi+zCDKd8/JnUWGDo5qnMHX9ih8ZsmIcBVo b8jLEiz9M+hd4JAg== Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id C523E2C141; Tue, 4 Jul 2023 12:10:54 +0000 (UTC) Date: Tue, 4 Jul 2023 12:10:54 +0000 (UTC) From: Richard Biener To: Tamar Christina cc: gcc-patches@gcc.gnu.org, nd@arm.com, jlaw@ventanamicro.com Subject: Re: [PATCH 6/19]middle-end: Don't enter piecewise expansion if VF is not constant. In-Reply-To: Message-ID: References: User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-11.0 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 List-Id: On Wed, 28 Jun 2023, Tamar Christina wrote: > Hi All, > > expand_vector_piecewise does not support VLA expansion as it has a hard assert > on the type not being VLA. > > Instead of just failing to expand and so the call marked unsupported we ICE. > This adjust it so we don't and can gracefully handle the expansion in support > checks. > > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. > > Ok for master? Hmm, do we support _any_ VLA "generic" vectors? That is, why do we get here at all? Doesn't that mean the vectorizer creates code that vector lowering thinks is not supported by the target? In any case I'd expect expand_vector_operations_1 at if (compute_type == NULL_TREE) compute_type = get_compute_type (code, op, type); if (compute_type == type) return; <---- here new_rhs = expand_vector_operation (gsi, type, compute_type, stmt, code, dce_ssa_names); to be able to assert that compute_type (or even type) isn't VLA? So, why do we arrive here? Richard. > Thanks, > Tamar > > gcc/ChangeLog: > > * tree-vect-generic.cc (expand_vector_comparison): Skip piecewise if not > constant. > > --- inline copy of patch -- > diff --git a/gcc/tree-vect-generic.cc b/gcc/tree-vect-generic.cc > index df04a0db68da3222f43dd938f8e7adb186cd93c9..da1fd2f40d82a9fa301e6ed0b2f4c3c222d58a8d 100644 > --- a/gcc/tree-vect-generic.cc > +++ b/gcc/tree-vect-generic.cc > @@ -481,7 +481,7 @@ expand_vector_comparison (gimple_stmt_iterator *gsi, tree type, tree op0, > } > t = gimplify_build1 (gsi, VIEW_CONVERT_EXPR, type, t); > } > - else > + else if (TYPE_VECTOR_SUBPARTS (type).is_constant ()) > t = expand_vector_piecewise (gsi, do_compare, type, > TREE_TYPE (TREE_TYPE (op0)), op0, op1, > code, false); > > > > > -- Richard Biener SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman; HRB 36809 (AG Nuernberg)