From patchwork Fri May 10 11:59:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 1098020 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-500430-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="IBtoZqA6"; 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 450pfz1tR4z9sBp for ; Fri, 10 May 2019 21:59:53 +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:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=sKf68yMcgyaWLbZdPvlZdOHmEQoumPU4gN21K1rWCkHSUMku+lETJ Ht2aQGAgjRt2+83VOPYE4M63MAAwUJJZksYTVAKXEuQSrOyzuIsN3KAyXfxGdOix VtDh1JICB6Ua5m2FXGKamXWU7cPbcOXCaqC489mxWNq0+mFEuh3SZI= 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:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=k9AmthKwu9Z7VWUVbBeVGOF4Z8U=; b=IBtoZqA6sr8tRuMEEHsE iTz/GEYzNlzqtkc/hHZRLr6zcE4wBmYvUjVDgmoEbvRTw7FBzMR3OPUpxse6+kQi C5MZijSEhB2zWyB1Qz90GNCAEJDT/FJFkkKuZ0RxDdF4Jp26FbqST4Q7HTHKnAr6 FHNmubjbr56jeL5os8+aNmU= Received: (qmail 86998 invoked by alias); 10 May 2019 11:59:45 -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 86986 invoked by uid 89); 10 May 2019 11:59:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=271001 X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 10 May 2019 11:59:44 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 07293AE08 for ; Fri, 10 May 2019 11:59:41 +0000 (UTC) Date: Fri, 10 May 2019 13:59:41 +0200 (CEST) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix missing next_value_id initialization Message-ID: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 also value_id for inserted calls was uninitialized. Bootstrapped / tested on x86_64-unknown-linux-gnu, applied to trunk and branch. Richard. 2019-05-10 Richard Biener * tree-ssa-sccvn.c (visit_reference_op_call): Initialize value-id. (do_rpo_vn): Initialize next_value_id. Index: gcc/tree-ssa-sccvn.c =================================================================== --- gcc/tree-ssa-sccvn.c (revision 271001) +++ gcc/tree-ssa-sccvn.c (working copy) @@ -4059,6 +4059,7 @@ visit_reference_op_call (tree lhs, gcall vr2->hashcode = vr1.hashcode; vr2->result = lhs; vr2->result_vdef = vdef_val; + vr2->value_id = 0; slot = valid_info->references->find_slot_with_hash (vr2, vr2->hashcode, INSERT); gcc_assert (!*slot); @@ -6467,6 +6468,7 @@ do_rpo_vn (function *fn, edge entry, bit unsigned region_size = (((unsigned HOST_WIDE_INT)n * num_ssa_names) / (n_basic_blocks_for_fn (fn) - NUM_FIXED_BLOCKS)); VN_TOP = create_tmp_var_raw (void_type_node, "vn_top"); + next_value_id = 1; vn_ssa_aux_hash = new hash_table (region_size * 2); gcc_obstack_init (&vn_ssa_aux_obstack);