From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11635 invoked by alias); 7 Dec 2006 18:24:31 -0000 Received: (qmail 11593 invoked by uid 48); 7 Dec 2006 18:24:21 -0000 Date: Thu, 07 Dec 2006 18:24:00 -0000 Message-ID: <20061207182421.11592.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/30104] missed code motion optimization (invariant control structures) In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dann at godzilla dot ics dot uci dot edu" 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: 2006-12/txt/msg00628.txt.bz2 ------- Comment #4 from dann at godzilla dot ics dot uci dot edu 2006-12-07 18:24 ------- (In reply to comment #3) > unswitching would duplicate the whole loop here, so not exactly I think. But > if-conversion to > > j = COND_EXPR > > or > > j = 2 - (int)p; > > would make j loop invariant. if-conversion would solve this particular testcase, but the more general case of moving invariant control structures out of the loop is probably more interesting. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30104