From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17415 invoked by alias); 16 May 2007 19:45:48 -0000 Received: (qmail 17357 invoked by uid 48); 16 May 2007 19:45:34 -0000 Date: Wed, 16 May 2007 19:45:00 -0000 Message-ID: <20070516194534.17356.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/31738] Fortran dot product vectorization is restricted In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dorit at il dot ibm dot com" 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: 2007-05/txt/msg01235.txt.bz2 ------- Comment #3 from dorit at il dot ibm dot com 2007-05-16 20:45 ------- (In reply to comment #2) > Here is what happens in the three loops that don't get vectorized: > (1) the loop in testvectdp2: ... > so the vectorizer is ok, except that in this case D.1437_32 doesn't seem to > be used anywhere in the function, so this stmt looks dead to me, but for > some reason it is not cleaned away before the vectorizer... Still need to > investigate why. So looks like the stmt D.1437_32 = prephitmp.192_37 became dead by pass pr31738a.f90.089t.copyprop3. So the question is what's the most appropriate fix: (1) fix copyprop3 to also clean away any dead code it creates? (2) add a dce pass after copyprop3? (3) work around it in the vectorizer. I think it should be easy - just move the check of the uses of the reduction in the loop until after the vectorizer analysis pass that marks relevant stmts. If (3) sounds like the way to go - I can prepare a patch for that. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31738