From patchwork Tue Nov 5 10:42:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 1189914 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-512549-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="ofD9KOof"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47714D6DcZz9sP3 for ; Wed, 6 Nov 2019 07:10:20 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=default; b=dEDdRTqL6R0OF3pmcEs6FN/xBJue7 /b7phxi9xijRCV2RNS/u4DafWZGP8bOPTxBFlZ+Tasclwemi3bKiuSICmBlG/4ls aXsPT0B3iuVwFtbvuZsEz+zy700T/B9f1/z8ByZohnY2CHcf3sMoGyplELDg58Ia GbwOYMr0RSOBFc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:references:date:in-reply-to:message-id:mime-version :content-type; s=default; bh=cVCuDa4S76mkthT4XRvTuBM3QLs=; b=ofD 9KOofu3zS/fGADtP8QLlFYBENxbUBhbHINrmDgZzLqTB6NeoNNiWDFVhtDxglKAT 5KVkaBeyUMkbeLiZs3q1Bn+Ws8pc/RXJUuhHjiI9L1qjuAMrVhoWRvbIRDLZBtoo buWSehkuH/8b8BtePc2d23jyXCXLpqIaR8+SirzQ= 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-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@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 10:42:15 +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 X-IsSubscribed: yes 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);