From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25019 invoked by alias); 12 Aug 2013 12:18:49 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 24836 invoked by uid 48); 12 Aug 2013 12:18:47 -0000 From: "mikpe at it dot uu.se" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/58039] -ftree-vectorizer makes a loop crash on a non-aligned memory Date: Mon, 12 Aug 2013 12:18:00 -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: 4.7.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: mikpe at it dot uu.se X-Bugzilla-Status: UNCONFIRMED 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: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-08/txt/msg00636.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58039 --- Comment #5 from Mikael Pettersson --- (In reply to Alexander Barkov from comment #4) > > The > > vectorizer turns those into larger and still mis-aligned `movdqa' stores, > > which x86 does not allow, hence the SEGV. > > Can you please clarify: is it a bug in the recent gcc versions? > > Note, we've used such performance improvement tricks for years. > It worked perfectly fine until now. > Has anything changed in how the gcc vectorizer works recently? I know next to nothing about the vectorizer, so I cannot comment on this. > Unfortunately it's not possible to avoid mis-aligned stores due to the > project architecture. Mis-aligned accesses are Ok, as long as they are expressed using the proper mechanisms (memcpy, attribute packed, or pragma packed). > I've read somewhere that gcc vectorizer generates two code branches, > for aligned memory and for non-aligned memory (but can't find > the reference now). Can you please confirm this? I don't know, see above.