From patchwork Thu Aug 15 09:24:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 1147510 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-507030-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="Ac0Y68mj"; 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 468Ld950Jmz9sNF for ; Thu, 15 Aug 2019 19:24:43 +1000 (AEST) 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:date:message-id:mime-version:content-type; q=dns; s= default; b=Zf6m7vpoRlDVy09ST97/qOMiwbxIN0Awk0GGadUapWYFratyIc+/O 9haompTqwyCraabblcAAE69Dfs1NtIbC94N4oilyluKKQl5m0CTwg7eNwF/fGMfj ZlP5YIEmlAqrhRetVWIVHBI0xouRGx8Kr4kGZUjlKboaINSXxYCIi4= 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:date:message-id:mime-version:content-type; s= default; bh=3yGWcST4Rf4F6vW3hgg7MdhVEXk=; b=Ac0Y68mjWDwcs45XYSrj xo8Q96/Oz5+FBvYngJBYCZmjEAYeNsD3JnOTKolS3duqnsjeLKOBgLCBvRQBCxgd rkZla6m4uQFgsUoWr96ao3xxlgQMRTNVTKcgSK2qaoxhhIXb9RdZC2C5Cnm/UT1q 5t9Negju5MCxiUS3x9bcOk8= Received: (qmail 69661 invoked by alias); 15 Aug 2019 09:24:35 -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 69650 invoked by uid 89); 15 Aug 2019 09:24:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.9 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; Thu, 15 Aug 2019 09:24:33 +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 550AE28 for ; Thu, 15 Aug 2019 02:24:32 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.99.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F06883F706 for ; Thu, 15 Aug 2019 02:24:31 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: Add missing check for BUILT_IN_MD (PR 91444) Date: Thu, 15 Aug 2019 10:24:30 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes In this PR we were passing an ordinary non-built-in function to targetm.vectorize.builtin_md_vectorized_function, which is only supposed to handle BUILT_IN_MD. Tested on aarch64-linux-gnu and spot-checked on powerpc64el-linux-gnu. Applied as obvious (r274524). Richard 2019-08-15 Richard Sandiford gcc/ PR middle-end/91444 * tree-vect-stmts.c (vectorizable_call): Check that the function is a BUILT_IN_MD function before passing it to targetm.vectorize.builtin_md_vectorized_function. Index: gcc/tree-vect-stmts.c =================================================================== --- gcc/tree-vect-stmts.c 2019-08-05 17:46:43.029559672 +0100 +++ gcc/tree-vect-stmts.c 2019-08-15 10:22:47.468694552 +0100 @@ -3376,7 +3376,7 @@ vectorizable_call (stmt_vec_info stmt_in if (cfn != CFN_LAST) fndecl = targetm.vectorize.builtin_vectorized_function (cfn, vectype_out, vectype_in); - else if (callee) + else if (callee && fndecl_built_in_p (callee, BUILT_IN_MD)) fndecl = targetm.vectorize.builtin_md_vectorized_function (callee, vectype_out, vectype_in); }