From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15131 invoked by alias); 12 Oct 2008 15:27:03 -0000 Received: (qmail 14612 invoked by uid 48); 12 Oct 2008 15:25:42 -0000 Date: Sun, 12 Oct 2008 15:27:00 -0000 Message-ID: <20081012152542.14611.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/37810] Bad store sinking job In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" 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: 2008-10/txt/msg00791.txt.bz2 ------- Comment #2 from rguenth at gcc dot gnu dot org 2008-10-12 15:25 ------- The original testcase (from an IRC discussion) reduced to a C testcase is: struct A { int n; int m; }; void g(); void test (struct A* iter) { struct A end = { 0, 0 }; while (iter->n != end.n) { iter->n = iter->n + 1; if (iter->n == iter->m) g(); } } where there is an optimization possibility to sink the store to iter->n to before the call and apply load-store motion to iter->n for the remaining loop. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |alias http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37810