From patchwork Thu Apr 24 21:54:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 342488 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 A4C721400F1 for ; Fri, 25 Apr 2014 07:54:35 +1000 (EST) 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:cc:subject:date:message-id:mime-version:content-type; q=dns; s=default; b=aTjW37HBa93bseYg1oAaBfnmsw1iXu3Q4sD4/TB9nyJ7Wh9UCN Jxa8YpFc3Xed//3sf1HUar4aN/7UCwggM3ru7Ari4u0WrsfHleqXGJua6hIzbc7T 8J2WNHOCJnB8xmyq1KsmoCQWP22wW0WU6bVqXAyPv79HiaRqF7AFK9XNo= 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:cc:subject:date:message-id:mime-version:content-type; s= default; bh=f3UDhlD8scG82bKQ6Z/u9AC9Ao8=; b=tVRl1gberURuWjxB6gCH /bh+XMzqvNlc9+kBw71FudfcinPhU4Q7JMe7H4JVga4drEVL+TwIM8NuM5Zzyy4D CvAyCRvHRsHl6H8ijtMV7fTTgM5kyWwB1NxuJRFUYjvOCqpxM/1hGSe9A/LsZh1V Rw/5o6hMlmyRuwT5aASuhhc= Received: (qmail 30186 invoked by alias); 24 Apr 2014 21:54:29 -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 30173 invoked by uid 89); 24 Apr 2014 21:54:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-we0-f178.google.com Received: from mail-we0-f178.google.com (HELO mail-we0-f178.google.com) (74.125.82.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 24 Apr 2014 21:54:27 +0000 Received: by mail-we0-f178.google.com with SMTP id u56so2867329wes.9 for ; Thu, 24 Apr 2014 14:54:24 -0700 (PDT) X-Received: by 10.194.188.41 with SMTP id fx9mr3646468wjc.56.1398376464604; Thu, 24 Apr 2014 14:54:24 -0700 (PDT) Received: from localhost ([2.26.169.52]) by mx.google.com with ESMTPSA id n5sm1603703wiz.1.2014.04.24.14.54.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Apr 2014 14:54:24 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, zadeck@naturalbridge.com, mikestump@comcast.net, rdsandiford@googlemail.com Cc: zadeck@naturalbridge.com, mikestump@comcast.net Subject: [wide-int] tree-ssa-ccp fix Date: Thu, 24 Apr 2014 22:54:23 +0100 Message-ID: <87zjjae6ls.fsf@talisman.default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 The asm comparison showed a problem with my r204593 change, which dropped a "val.mask &" in the second hunk below. Seeing that the problem was in ccp made me look at the whole file again. I noticed that we'd changed the VARYING mask value from -1 to 1, which didn't look intentional. Tested on x86_64-linux-gnu. OK to install? Thanks, Richard Index: gcc/tree-ssa-ccp.c =================================================================== --- gcc/tree-ssa-ccp.c 2014-04-23 19:13:20.488547331 +0100 +++ gcc/tree-ssa-ccp.c 2014-04-23 19:30:07.025416946 +0100 @@ -607,7 +607,7 @@ get_value_for_expr (tree expr, bool for_ else { val.lattice_val = VARYING; - val.mask = 1; + val.mask = -1; val.value = NULL_TREE; } return val; @@ -1848,7 +1848,7 @@ evaluate_stmt (gimple stmt) if (nonzero_bits == 0) val.mask = 0; else - val.mask = extend_mask (nonzero_bits); + val.mask = val.mask & extend_mask (nonzero_bits); } } }