From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1247 invoked by alias); 26 Sep 2011 10:37:10 -0000 Received: (qmail 1206 invoked by uid 22791); 26 Sep 2011 10:37:09 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 26 Sep 2011 10:36:56 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/50522] C++ std::valarray vectorization missed optimization Date: Mon, 26 Sep 2011 10:47: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-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Last reconfirmed Ever Confirmed Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2011-09/txt/msg01926.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50522 Richard Guenther changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011-09-26 Ever Confirmed|0 |1 --- Comment #2 from Richard Guenther 2011-09-26 10:36:38 UTC --- (In reply to comment #1) > Created attachment 25365 [details] > gcc47-pr50522-hack.patch > > The perhaps safer hack, which handles only pointers initialized from > casted TYPE_RESTRICT or POINTER_PLUS_EXPR of TYPE_RESTRICT. Both functions are > still vectorized. Looks like a hack ;) Restrict support was designed to work without the TYPE_RESTRICT checks but ISTR there were miscompiles without adding them - maybe all latent issues have been fixed now, but you might run into PR48764 more often. Restrict will propagate through ptr/int/ptr conversions but should end up aliased whenever two resulting pointers are based off the same initial restrict tag. Thus, if removing TYPE_RESTRICT checks bootstraps and tests ok, I'd approve that patch ...