From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ACADA3858D37; Mon, 6 Jul 2020 14:13:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ACADA3858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1594044823; bh=crgVtyc9xaHx/mbSiKMOkIQmyy2KwDBONUN2+r8PuzA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=iLUfCqaHVvBeDrwKsoDciAyzjv+wjWJhektelYGKtKvLVNYiPB3HrwR32jZPk1SrQ YB0OvPAz7J7mcXws7zVPmTuYY0/TxwA2EX48PgkPIexg/+lniqmiRzVIXK4rB/Ss1A 6UxMCTtbj+bkvdHSoSUXHvyF2mSCxGKyT4CojTaw= From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/96075] [8/9/10/11 Regression] bogus alignment for negative step grouped access Date: Mon, 06 Jul 2020 14:13:43 +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: 11.0 X-Bugzilla-Keywords: needs-bisection X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 8.5 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 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, 06 Jul 2020 14:13:43 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96075 --- Comment #5 from rguenther at suse dot de --- On Mon, 6 Jul 2020, rsandifo at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96075 >=20 > --- Comment #4 from rsandifo at gcc dot gnu.org --- > (In reply to Richard Biener from comment #3) > > So we end up calling get_negative_load_store_type for this group which = seems > > to only handle contiguous accesses but this one is single element > > interleaving > > aka contiguous with gap. > >=20 > > vect_supportable_dr_alignment returns dr_aligned which is seemingly OK = for > >=20 > > #(Data Ref:=20 > > # bb: 3=20 > > # stmt: _4 =3D y[_2]; > > # ref: y[_2]; > > # base_object: y; > > # Access function 0: {1022, +, -2}_1 > Are you sure we support this? I think=E2=80=A6 >=20 > > /* If this is a backward running DR then first access in the larger > > vectype actually is N-1 elements before the address in the DR. > > Adjust misalign accordingly. */ > > if (tree_int_cst_sgn (step) < 0) > > {=20 > > tree offset =3D ssize_int (TYPE_VECTOR_SUBPARTS (vectype) - 1); > > /* DR_STEP(dr) is the same as -TYPE_SIZE of the scalar type, > > otherwise we wouldn't be here. */ > =E2=80=A6really was the assumption for negative steps at one time, > and I'm not sure off-hand when/if that changed. >=20 > (Of course, it might be that one of my patches changed it.) Yeah - me too. We still don't seem to support those for interleaving [single element] groups but we let them slip through for SLP ... That said, the patch shouldn't make the situation worse at least ;)=