From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 60831 invoked by alias); 5 Nov 2019 20:10:02 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 60794 invoked by uid 89); 5 Nov 2019 20:10:02 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.110.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 05 Nov 2019 20:09:58 +0000 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 C8BB54F2 for ; Tue, 5 Nov 2019 12:09:56 -0800 (PST) Received: from localhost (e121540-lin.manchester.arm.com [10.32.98.126]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 361C03FD80 for ; Tue, 5 Nov 2019 02:42:16 -0800 (PST) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: [10a/n] Require equal type sizes for vectorised calls References: Date: Tue, 05 Nov 2019 20:10:00 -0000 In-Reply-To: (Richard Sandiford's message of "Fri, 25 Oct 2019 13:30:08 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2019-11/txt/msg00342.txt.bz2 As explained in the comment, vectorizable_call needs more work to support mixtures of sizes. This avoids testsuite fallout for later SVE patches. Was originally going to be later in the series, but applying it before 11/n seems safer. As before each patch tested individually on aarch64-linux-gnu and the series as a whole on x86_64-linux-gnu. 2019-11-04 Richard Sandiford gcc/ * tree-vect-stmts.c (vectorizable_call): Require the types to have the same size. Index: gcc/tree-vect-stmts.c =================================================================== --- gcc/tree-vect-stmts.c 2019-11-05 10:38:50.718047381 +0000 +++ gcc/tree-vect-stmts.c 2019-11-05 10:38:55.542013228 +0000 @@ -3317,6 +3317,19 @@ vectorizable_call (stmt_vec_info stmt_in return false; } + /* FORNOW: we don't yet support mixtures of vector sizes for calls, + just mixtures of nunits. E.g. DI->SI versions of __builtin_ctz* + are traditionally vectorized as two VnDI->VnDI IFN_CTZs followed + by a pack of the two vectors into an SI vector. We would need + separate code to handle direct VnDI->VnSI IFN_CTZs. */ + if (TYPE_SIZE (vectype_in) != TYPE_SIZE (vectype_out)) + { + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "mismatched vector sizes %T and %T\n", + vectype_in, vectype_out); + return false; + } /* FORNOW */ nunits_in = TYPE_VECTOR_SUBPARTS (vectype_in);