From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CF5D13858D28; Thu, 31 Aug 2023 13:49:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CF5D13858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693489783; bh=+yo88mHa0Wm7HOg42AKAAnk7qVfXt3BWepSO1w7cWFs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tzmHBv2Ryl5cdQBdK9nyqM7pPuVJ5E2MyjSldkfEW3+qHWK3IB6+R7DwWXsZ3CwqV XK/DSB0UH+/Ue3VHnDlNDdHj8ZG9l7wOTDyWDDkn2saXhRU9ZheCIOXHo8yjn/E7mr SW3A3EZ77u4ZyN5uPkUS450hniEw3PPQnkNy5kuU= From: "luke.geeson at cs dot ucl.ac.uk" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/111246] PPC64 Sequentially Consistent Load allows Reordering of Stores Date: Thu, 31 Aug 2023 13:49:43 +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: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: luke.geeson at cs dot ucl.ac.uk 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: --- 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=3D111246 --- Comment #6 from Luke Geeson --- Apologies - I've been thinking in syncs and fences too much! Yes I mean `lwsync`, for clarity I repeat the above so you know it is the correct fix: ``` lukegeeson@machine:~/Dev/tv-dev/herdtools7$ cat test.litmus PPC test-fixed { [P1_r0]=3D0;[x]=3D0;[y]=3D0; uint64_t %P0_x=3Dx; uint64_t %P0_y=3Dy; uint64_t %P1_P1_r0=3DP1_r0;uint64_t %P1_x=3Dx; uint64_t %P1_y=3Dy } (*****************************************************************) (* the Telechat toolsuite *) (* *) (* Luke Geeson, University College London, UK. *) (* *) (*****************************************************************) P0 | P1 ; li r10,2 | sync ; stw r10,0(%P0_x) | lwz r9,0(%P1_y) ; lwsync | cmpw r9,r9 ; sync | b L0x50 ; li r10,1 | L0x50: lwsync ; stw r10,0(%P0_y) | li r8,1 ; | stw r8,0(%P1_x) ; | stw r9,0(%P1_P1_r0) ; exists ([x]=3D2 /\ P1_r0=3D1) lukegeeson@machine:~/Dev/tv-dev/herdtools7$ ./_build/install/default/bin/h= erd7 -model ppc.cat -I herd/libdir test.litmus Test test-fixed Allowed States 3 [P1_r0]=3D0; [x]=3D1; [P1_r0]=3D0; [x]=3D2; [P1_r0]=3D1; [x]=3D1; No Witnesses Positive: 0 Negative: 3 Condition exists ([x]=3D2 /\ [P1_r0]=3D1) Observation test-fixed Never 0 3 Time test-fixed 0.01 Hash=3Db215018fe694934d3b5fd1dc5eef48e9 ```=