From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 26A1D3858C66; Mon, 24 Jul 2023 18:03:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 26A1D3858C66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690221780; bh=ys/YwCTOeefoz6MgcQuu81LrY/7Khso8VH0apmjyqpU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sQa1bnoW3JXo/mzDh4RsFHfDGrgF+I1/5ie/T1AdeGbazEkbLTp9Hjqavlb/ahfPx uDeRKrZhNZPY4t8xpoKIxgeQNPEc3v92HqYDs4/c5HxbJgcU+kpEYrPeb6ReABWI/y f95X/kIldcl/PwdsQfQBZa6iRYHRcx+VlN2Q1iEg= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110792] [13/14 Regression] GCC 13 x86_32 miscompilation of Whirlpool hash function Date: Mon, 24 Jul 2023 18:02:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.1.1 X-Bugzilla-Keywords: needs-bisection, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110792 --- Comment #5 from Andrew Pinski --- When this is split: (insn 12 11 18 2 (set (reg:DI 0 ax [87]) (rotate:DI (mem:DI (plus:SI (mult:SI (reg:SI 0 ax [orig:89 x0 ] [89= ]) (const_int 8 [0x8])) (symbol_ref:SI ("WHIRL_S") [flags 0x2] )) [1 WHIRL_S[_1]+0 S8 A64]) (const_int 32 [0x20]))) "/app/example.cpp":4:75 971 {rotl32di2_doubleword} (nil)) It gets split incorrectly into: (insn 21 11 22 2 (set (reg:SI 0 ax [87]) (mem:SI (plus:SI (mult:SI (reg:SI 0 ax [orig:89 x0 ] [89]) (const_int 8 [0x8])) (const:SI (plus:SI (symbol_ref:SI ("WHIRL_S") [flags 0x2]=20 ) (const_int 4 [0x4])))) [1 WHIRL_S[_1]+4 S4 A32])) "/app/example.cpp":4:75 91 {*movsi_internal} (nil)) (insn 22 21 18 2 (set (reg:SI 1 dx [+4 ]) (mem:SI (plus:SI (mult:SI (reg:SI 0 ax [orig:89 x0 ] [89]) (const_int 8 [0x8])) (symbol_ref:SI ("WHIRL_S") [flags 0x2] )) [1 WHIRL_S[_1]+0 S4 A64])) "/app/example.cpp":4:7= 5 91 {*movsi_internal} (nil)) Basically ax set before its use in the memory ...=