From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 64FE23858D39 for ; Fri, 3 Nov 2023 19:08:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 64FE23858D39 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 64FE23858D39 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=1699038512; cv=none; b=c9BBWN2Q4CNmFnsIOn4+iPeB+x/CL/TX4MpxXhUNz1v55xqZOkxlTIf1lxXftxtACX0y45YsZrvfFWjQHgEoidjUfp5xegOtPiQSsKDp+tspEz7gzBiqI46WSrTBk5LVjKBKt2TgKpLljaq+D5rF3lIYvp/ZB+gYLz1tDxcgm6M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699038512; c=relaxed/simple; bh=HY9Z2JKZc+6eDPol3uDcyUxRFHUKujYa2YUqLdXbK7k=; h=Message-ID:Date:MIME-Version:To:From:Subject; b=qV0epb4dONai1vo+BtrhSIJcdIEqXJjpPkf5uTz4/shhlpU59Q9ACCUQkB32Ce58/hN0tq38zHLD9j5+CeCPpDRk9Lidhbg570dp/uuHtNrkRZkvhdUf3W1Agz81faJ1ROaDAq9DNlNGcTdKYpKeL62uz2IXEorQnzJOrRxSmMk= 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 88EEE2F4; Fri, 3 Nov 2023 12:09:04 -0700 (PDT) Received: from [10.57.72.147] (unknown [10.57.72.147]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 038273F738; Fri, 3 Nov 2023 12:08:20 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------0409zpsH0fJz9G6Rl0hsN7jE" Message-ID: <91d3f8ee-8b2c-4866-a3ed-beb2953b5438@arm.com> Date: Fri, 3 Nov 2023 19:08:18 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: "gcc-patches@gcc.gnu.org" Cc: Richard Sandiford , Richard Biener , "jakub@redhat.com" From: "Andre Vieira (lists)" Subject: [RFC] vect: disable multiple calls of poly simdclones X-Spam-Status: No, score=-13.5 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,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: This is a multi-part message in MIME format. --------------0409zpsH0fJz9G6Rl0hsN7jE Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, The current codegen code to support VF's that are multiples of a simdclone simdlen rely on BIT_FIELD_REF to create multiple input vectors. This does not work for non-constant simdclones, so we should disable using such clones when the VF is a multiple of the non-constant simdlen until we change the codegen to support those. Enabling SVE simdclone support will cause ICEs if the vectorizer decides to use a SVE simdclone with a VF that is larger than the simdlen. I'll be away for the next two weeks, so cant' really discuss this further. I initially tried to solve the problem, but the way vectorizable_simd_clone_call is structured doesn't make it easy to replace BIT_FIELD_REF with the poly-suitable solution right now of using unpack_{hi,lo}. Unfortunately I only found this now as I was adding further tests for SVE :( gcc/ChangeLog: * tree-vect-stmts.cc (vectorizable_simd_clone_call): Reject simdclones with non-constant simdlen when VF is not exactly the same. --------------0409zpsH0fJz9G6Rl0hsN7jE Content-Type: text/plain; charset=UTF-8; name="no_multiple_vf_poly_simdclone.patch" Content-Disposition: attachment; filename="no_multiple_vf_poly_simdclone.patch" Content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