From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E61763858D28; Fri, 22 Mar 2024 07:33:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E61763858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711092829; bh=VV5vwVTYUuLNJxmRFvexL9K9kCjaJpsYX7qIPsEQn5s=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OzWYBqkwVc1nyfGNg/uIA5GZaVYP/LbXOeKDfD7gePJgqIyzBriLCq79EMjgLRVOq 5KaDYIREZStyeMjEb/shH9huq6DJHlx5k41shnth68mhEmRnHb7vfGDTrYX2tXOtXU ADLsD3TvJRkt0Z7SXzkr6xQ+HVVVu23e7mjIMet8= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/111683] [11/12/13/14 Regression] Incorrect answer when using SSE2 intrinsics with -O3 since r7-3163-g973625a04b3d9351f2485e37f7d3382af2aed87e Date: Fri, 22 Mar 2024 07:33:48 +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: 10.2.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D111683 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rsandifo at gcc dot gnu.org --- Comment #15 from Richard Biener --- the problem is in dependence analysis itself - by design classic dependence analysis relies on a[i] and a[i+1] not aliasing but for DRs like Creating dr for MEM[(U * {ref-all})_1] analyze_innermost: success. base_address: &c offset from base address: 0 constant offset from base address: 0 step: 8 base alignment: 32 base misalignment: 0=20 offset alignment: 128 step alignment: 8 base_object: MEM[(U * {ref-all})&c] Access function 0: {0B, +, 8}_1 The access function evolves in a way that this doesn't hold. It might be tempting to fail data-ref analysis itself but it's really subscript dependence testing that doesn't work. OTOH we already have code in dr_analyze_indices to deal with similar cases concerning overlap by adjusted base offset. Note in theory we handle non-constant increments, so we eventually would have to ditch support for those at all.=