From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4C9463858C53; Thu, 8 Feb 2024 11:59:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C9463858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707393559; bh=DfGowmJ2Mi8rVQtiF+h8EDhIWxKb7nx3jpcYn/I/quE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NabSNiJeMzIROy2VfLRGvWw3YshHr0I2esbHVBcZ0Jon0O/b5iFWp23xAJ1Q8SsbZ fuL68DxdJy7yUeC1qCHOp8eCDMoHdPG1+S3eRHa0C04gFCCvJDO6QoQJ4Crk+IwcPn g6FuDSwAcUQKvOeHH+qfrDZyOXTqmABnX+T4ryg8= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/113734] [14 regression] libarchive miscompiled (fails libarchive_test_read_format_rar5_extra_field_version test) since r14-8768-g85094e2aa6dba7 Date: Thu, 08 Feb 2024 11:59:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: tnfchris at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 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=3D113734 --- Comment #11 from Richard Biener --- (In reply to Tamar Christina from comment #10) > (In reply to Richard Biener from comment #9) > > Another bug in the dependence checking code is > >=20 > > if (dr_may_alias_p (dr_ref, dr_read, loop_nest)) > >=20 > > which will end up using TBAA - dr_may_alias_p doesn't think you are ever > > going to move stores down across loads. To verify if that's possible > > you need to use > >=20 > > if (dr_may_alias_p (dr_read, dr_ref, loop_nest)) > >=20 > > instead. > >=20 > > Note there's still my very original review consideration that you move > > stmts out-of-order but the main dependence checking the vectorizer does > > assumes the stores and loads appear in their original order. I'm not > > sure whether with the above we prove this doesn't matter. >=20 > But in the original review I had it that way and you said: >=20 > > + for (auto dr_read : bases) > > + if (dr_may_alias_p (dr_read, dr_ref, loop_nest)) >=20 > I think you need to swap dr_read and dr_ref operands, since you > are walking stmts backwards and thus all reads from 'bases' are > after the write. >=20 > so I'm somewhat confused.. I was confused.=