From patchwork Fri Sep 15 10:45:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 112706 Delivered-To: patch@linaro.org Received: by 10.80.163.150 with SMTP id s22csp451643edb; Fri, 15 Sep 2017 03:46:09 -0700 (PDT) X-Received: by 10.99.122.91 with SMTP id j27mr23144204pgn.2.1505472369427; Fri, 15 Sep 2017 03:46:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505472369; cv=none; d=google.com; s=arc-20160816; b=v8PFblA1uFAC5W6Oc8V8mwqiMkDsysp4+9g1Vs9FYUqSwkg5A5PSs/clpIkyTv9fDa WTGQg5BzqAmQXbQds1uTTvTs8a7mbom9jxkmpExAWyu+Oa8xWXJHTZ+ydaN21LzPiZsO p5Tliv8SkMJrRRGbwhHpWhNMbqvO9zQgYDkwB4wbYHEsm7LLEYakBcg/dPavcaicpl8O e2cHS9lt1e7y7F3ldk8K7asVKTw5gUmWIDSkeUtc1xgBtm/ZL0bxaoQzCmXKObAwKZxX La7aXn9vGZAbWy4PSrS4CsuANEU4UkgcpT618bqqbHsOmghfTiWknD9Bc0BaPAkEvJyZ wHlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:message-id:date:subject:mail-followup-to:to :from:delivered-to:sender:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature:arc-authentication-results; bh=47HdAK2rV+ukcubtZZAr8i2TOE/W00LDunj/6Xgqa8g=; b=0wnGY2GxzTGwhroQ6ZCdMmh1XXS44M1bDfRm8FcNKxup5Ax/dBEOOHa9j4C6AX82/p ol04BY9IBx7wjKschkS0h0fs/ouTN4r4mEkVhgJ15o3uDyG3vWbktH04DsweXrOurwoe eAVZNNCVVhNi6uMuq23MCZw5XaY95J8B956sU6oZn+AIH74UqY+yqqs5Y+K00bQLO3Wi KVqoJ3tys795Q7tn1aU/NVOZxQbmVefqmA17+bBciq1AikcbAVgsClhmvkAuKynWYrCM fj2kyOfL/UFIaUntSx1ltUVHduyx0JIZFMF7sK6CInUQqZpC/s96SLJpAD1qUm42BC4O h/ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Zm/m8bRy; spf=pass (google.com: domain of gcc-patches-return-462218-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-462218-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id q1si498039plb.389.2017.09.15.03.46.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Sep 2017 03:46:09 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-462218-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Zm/m8bRy; spf=pass (google.com: domain of gcc-patches-return-462218-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-462218-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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=FkN0vFfYRW8iGytiGH0zNP/K71i1oIDCWTcw6i+gmKY08X5XapEH8 2YJxWWRzI/k8GwXHFj/CN8J3VUhdj90G+OEfkjAMdsEQz+QADwT+Z0lpLa7ixV4E +G/DJ91/5l8h9fco1VEh/EEbl/ugojlmzhboIhtYVchhEaZfd3UDA0= 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=fG4CImiylK5Fd3oLq9rTeh5ErmM=; b=Zm/m8bRy7pwh/VW7+LMX Eh4edTA9y5l00v+ZHOkGpr852zokK8i9DDrxKXzCZRqdD8cMk4xtJNheg4HlK+bF 0OS0Hs3xEmrq/2N073skA3AhcN3jzG5uZeNx+7OaaLdHBGmCEt/ztXcX6zcZuy2k oPlpWG61/I4q1zPpYI4KfqE= Received: (qmail 80030 invoked by alias); 15 Sep 2017 10:45:58 -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 80014 invoked by uid 89); 15 Sep 2017 10:45:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wm0-f44.google.com Received: from mail-wm0-f44.google.com (HELO mail-wm0-f44.google.com) (74.125.82.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 15 Sep 2017 10:45:56 +0000 Received: by mail-wm0-f44.google.com with SMTP id e71so7198172wmg.4 for ; Fri, 15 Sep 2017 03:45:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:mail-followup-to:subject:date:message-id :user-agent:mime-version; bh=47HdAK2rV+ukcubtZZAr8i2TOE/W00LDunj/6Xgqa8g=; b=RnMTcfmwUt/wv88p9h3PIdKe4JX21kjMv1O1PkcDJobLe9NRu5oc83mBtnS2b+axLY iVcPJTfSa3gBjd4seNDtbdXVne9FOdvHcynAOB1w9gWmc21lhq77+G/n9BZN2eGrq4JK 7if7TpQzIuvuSMNMHT/BzW3Q7vM7yI7tWhmuAcPrnjNAImziHb+kt72NXKYZDjxJNCHm JNeeGOo5S9pnL5LNrEir4Am6jDFznCUr+RvbvZRWs+YTRPHjcxnyFggIl1ki2PHT9Rvt 8QC3wlTNIr13N70IXU4x5X6qJWDI5aE/aVM/wG/e1AjvySy535ah04ga5wf51bDIdXXX PeRg== X-Gm-Message-State: AHPjjUiz3L6ltFTcm5vbDwH8C67+O7ORQvW1I6rLDc0NsYNNUjpLIx4Z zekT+Xf/j6AHNk915BMM3w== X-Google-Smtp-Source: AOwi7QCw1E4FSDfX+TQ/qb8VLKCbHbV4POak0SOGu8K/7JtIkVo+VBan6b5oE8pkGJt8cJkQVg3BQQ== X-Received: by 10.28.150.199 with SMTP id y190mr2535348wmd.51.1505472354674; Fri, 15 Sep 2017 03:45:54 -0700 (PDT) Received: from localhost (92.40.248.1.threembb.co.uk. [92.40.248.1]) by smtp.gmail.com with ESMTPSA id 69sm741387wmi.0.2017.09.15.03.45.53 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Sep 2017 03:45:54 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org Subject: Fix type of bitstart in vectorizable_live_operation Date: Fri, 15 Sep 2017 11:45:52 +0100 Message-ID: <87a81wnstb.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 This patch changes the type of the multiplier applied by vectorizable_live_operation from unsigned_type_node to bitsizetype, which matches the type of TYPE_SIZE and is the type expected of a BIT_FIELD_REF bit position. This is shown by existing tests when SVE is added. Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu. OK to install? Richard 2017-09-15 Richard Sandiford Alan Hayward David Sherwood gcc/ * tree-vect-loop.c (vectorizable_live_operation): Fix type of bitstart. Index: gcc/tree-vect-loop.c =================================================================== --- gcc/tree-vect-loop.c 2017-09-15 11:37:45.639244036 +0100 +++ gcc/tree-vect-loop.c 2017-09-15 11:38:33.276424843 +0100 @@ -7090,7 +7090,7 @@ vectorizable_live_operation (gimple *stm vec_lhs = gimple_get_lhs (SLP_TREE_VEC_STMTS (slp_node)[vec_entry]); /* Get entry to use. */ - bitstart = build_int_cst (unsigned_type_node, vec_index); + bitstart = bitsize_int (vec_index); bitstart = int_const_binop (MULT_EXPR, bitsize, bitstart); } else