From patchwork Mon Aug 21 09:46:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 110508 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp3841089obb; Mon, 21 Aug 2017 02:46:49 -0700 (PDT) X-Received: by 10.98.209.73 with SMTP id t9mr3555672pfl.307.1503308809690; Mon, 21 Aug 2017 02:46:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503308809; cv=none; d=google.com; s=arc-20160816; b=Rwyqvb2G+s7MxQGzXWCYRTKiFLW2Hns0c2mcl3NDd3CmW6A8tjnlTl5V3tCBQ62r59 3QB7Xi8Ob42EY66f54w4TmLUFifNJiIA2WWKj4arevwLXAp/cvm8v9UtNPuA+CyPg2rK jq+1UNkyLhnh0JIDfTPT1YvrSliEexvhHaRegbs7bWunSDH5mCeSuUDPPYiVYEVtzjdO yfa8iIM5/VKKEzwb4afXOQjebshu+fDNuosARzfo6EariYc6Vf2cvIxefXnFC0d9b/BG nolO2k++h+QgiLHT3v4Wzee0nkBK3p71pRtC0eCC19Meb9a+bQpV7x7oNfIC521jFiLn ka7Q== 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=r6XSr8v0ULpS1Fx8jcDJyrW6d2J73AXJ7ObDDro99Uo=; b=kMxKESZmqHa9BYydRB+ylbK7sbkbKSN+1uhdP094ZBzU+hIqTR9Z9E7LYC9k9OB7dI bpew7RGUhJJHPZd4CDmxZ8v+S5f9e7pZiFb0CuRYl4MF+JQMYTgVwCsX1xZeP1fWHZ6K YsMwC/WlaahIaCQicARy2vkUXYnAUDOky2+vUYRCmIzty/J66MgY2HrTLZYT5Nyx6RWL QQAGul/Pr/wlMZknR29JaT/4OQU0gDyzQLBxilc8bXz3DtTIBpUmeQaFeac/38LW3pi5 /4pPUqguV7kEwhDV2+u/hi5cGA9rmXwI5HY0TYkY8w0oHVNLt9XTj9W33E8s/LbGfUtb o0bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Lrx0H9LK; spf=pass (google.com: domain of gcc-patches-return-460623-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-460623-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 o4si6765548pgq.683.2017.08.21.02.46.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Aug 2017 02:46:49 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-460623-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=Lrx0H9LK; spf=pass (google.com: domain of gcc-patches-return-460623-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-460623-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=kOVQP77pQpIbdUcWLq1ftRFD2lAF4HOFil3y4o+2YwUKvxkl3HE9K T+5pfeNYVr2LipF40WR/iniq28pFcW5AJfnnS//Crz9Har9h6/7I0lZXGoKySl7Y FpqOGkxnS1IUwvjwqPo8vpvYrKU0JcNkqLjFcIS7Wtp2P0kisYKARs= 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=uPfxOQAU7zGYd24pVng9mc+btbw=; b=Lrx0H9LKZSxN9lfXPJSr 2BK4lk6Vpn/Wi0WGAUjwdzbsFDLdyZzydSuO0mNdNMY7MpDHhYQ4qrK8rjZF4f73 xPfaOVEa0ms2XBiBR+eiThYhj8zV3eX3A7cLKue9MND3BEmmIqLsZD0uy4MxwaZX rqybVdVoVg+pRA7qaxl2jGk= Received: (qmail 87432 invoked by alias); 21 Aug 2017 09:46:31 -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 87402 invoked by uid 89); 21 Aug 2017 09:46:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=Applied X-HELO: mail-wr0-f174.google.com Received: from mail-wr0-f174.google.com (HELO mail-wr0-f174.google.com) (209.85.128.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 21 Aug 2017 09:46:28 +0000 Received: by mail-wr0-f174.google.com with SMTP id p14so25372092wrg.1 for ; Mon, 21 Aug 2017 02:46:27 -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=r6XSr8v0ULpS1Fx8jcDJyrW6d2J73AXJ7ObDDro99Uo=; b=nNwa1kCZckrXvrRJ/+z3e716wkH+ZLcsX6tYqGSTLE5w1CQgQn9LE+6LAF9G0M3aC8 O07fsXMszis6JtUokGy4zN6SHErldcsHZwxO53MyEw7D7caojRi6FCmxUSjXJSIHizU1 f4YvbrCjnHwt4fWSl/VV5Qh2PBu6TXFlE79Yqjh8OMYMNV48H5LbePv+ZEnCOtR2jMbn FcLJqX7MN8FBaywFGLQDogHZBoKbazXXzGfAnuxktPsBTtRxRXB5VkUKglsO1qMwncSB Kex65ACJyLGp008sXrd5Q5oXJZJ054QPpC2wP2BTPdeiNfW64v2O0UiXmk9f/mgJGYfD CQlQ== X-Gm-Message-State: AHYfb5h5q0IuG+e13u4xol8mFoCduatNBryko/1p9PBFPakFunID36tj Aru/HpMawE2pMOYIG5wi/A== X-Received: by 10.28.195.132 with SMTP id t126mr1306279wmf.55.1503308785986; Mon, 21 Aug 2017 02:46:25 -0700 (PDT) Received: from localhost (92.40.249.204.threembb.co.uk. [92.40.249.204]) by smtp.gmail.com with ESMTPSA id t135sm8044496wmt.26.2017.08.21.02.46.23 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Aug 2017 02:46:24 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org Subject: [committed] Fix bogus CONST_WIDE_INT hash Date: Mon, 21 Aug 2017 10:46:18 +0100 Message-ID: <87shgldzit.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 The CONST_WIDE_INT case in const_rtx_hash_1 started the hash with the precision of the mode, but the mode is always VOIDmode. Tested on aarch64-linux-gnu and x86_64-linux-gnu. Applied as obvious. Richard 2017-08-21 Richard Sandiford Alan Hayward David Sherwood gcc/ * varasm.c (const_rtx_hash_1): Don't hash in the mode of a CONST_WIDE_INT. Index: gcc/varasm.c =================================================================== --- gcc/varasm.c 2017-08-10 14:36:08.449457108 +0100 +++ gcc/varasm.c 2017-08-21 10:43:04.352530400 +0100 @@ -3639,7 +3639,7 @@ const_rtx_hash_1 (const_rtx x) break; case CONST_WIDE_INT: - hwi = GET_MODE_PRECISION (mode); + hwi = 0; { for (i = 0; i < CONST_WIDE_INT_NUNITS (x); i++) hwi ^= CONST_WIDE_INT_ELT (x, i);