From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C6533385C019; Mon, 16 Mar 2020 08:07:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C6533385C019 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1584346055; bh=se+Yp1FfqKtV3NiNIE+UL3mVlT8bvDda1AQg2PiSgm4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uQRw9dYYqroDZuZAURp5zo1EqZ/+RLeRiD5rYZzdwhA+6282RAND5wNCbQdERVxU2 0hIZZFF9qXEy4ezTduANeL6EI1IcJoVAGwP0cCkRv9DZH7IJhyhRKyjFTzmG4lhKX4 Eljj8kn+iu2Nrsk8Pxlw84nk4PE/4H6rWh580S9I= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/94166] [10 Regression] random -fcompare-debug failures since r10-1913 Date: Mon, 16 Mar 2020 08:07:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Mar 2020 08:07:35 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94166 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #5 from Jakub Jelinek --- Oops, I've screwed up, the commit log should have been: reassoc: Avoid code generation to depend on hash_map traversal [PR94166] On the following testcase, if there is ASLR, the compiler generates=20=20= =20=20=20=20=20=20=20=20=20=20=20 different code each time (out of 1000 invocations 994 unique assembler=20= =20=20=20=20=20=20=20=20=20 contents). The problem is that undistribute_bitref_for_vector uses=20=20= =20=20=20=20=20=20=20=20=20=20=20 a hash_map from a tree (SSA_NAME) to a vector and such a hash_map is=20=20= =20=20=20=20=20=20=20=20=20=20 by default doing pointer hashing on the SSA_NAME rather than using=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 something stable (SSA_NAME_VERSION).=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20 One possible way would be to use SSA_NAME_VERSION as hash function,=20=20= =20=20=20=20=20=20=20=20=20=20=20 but given that we from the hash_map traversal just populate a vector=20=20= =20=20=20=20=20=20=20=20=20=20 which is then sorted, I think it is easier to make the sort callback=20=20= =20=20=20=20=20=20=20=20=20=20 use SSA_NAME_VERSION as secondary sorting key and thus ensure stable=20=20= =20=20=20=20=20=20=20=20=20=20 sort (that is generally desirable anyway).=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 instead. Sorry.=