From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17523 invoked by alias); 25 Sep 2011 12:14:40 -0000 Received: (qmail 17512 invoked by uid 22791); 25 Sep 2011 12:14:28 -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; Sun, 25 Sep 2011 12:14:14 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/50489] [UPC/IA64] mis-schedule of MEM ref with -ftree-vectorize and -fschedule-insns2 Date: Sun, 25 Sep 2011 12:26:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: 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/msg01821.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50489 --- Comment #5 from Richard Guenther 2011-09-25 12:13:44 UTC --- D.3059_11 = VIEW_CONVERT_EXPR(D.3058); looks like bogus IL to me. You view D.3058, a struct of size 16, as a pointer (of size 8). I suppose you want to load D.3058.vaddr here? D.3060_12 = (shared [8] struct foo *) D.3059_11; D.3061_13 = VIEW_CONVERT_EXPR(D.3060_12).phase; looks bogus IL to me. It views the pointer(!?) D.3060_12 as being a struct upc_shared_ptr_t and extracts a value that is not within that pointer. But maybe I'm missing something because I don't recognize that 'shared [8]' qualification. Do you want to dereference D.3060_12 (D.3058.vaddr) here? That said, I wonder why you don't trip over tree-cfg.c verification of VIEW_CONVERT_EXPR as TYPE_SIZE (TREE_TYPE (D.3060_12)) != TYPE_SIZE (struct upc_shared_ptr_t). Please try to avoid using VIEW_CONVERT_EXPRs completely unless you know exactly what you are doing.