From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5322 invoked by alias); 19 Jul 2007 17:14:53 -0000 Received: (qmail 5304 invoked by uid 48); 19 Jul 2007 17:14:44 -0000 Date: Thu, 19 Jul 2007 17:14:00 -0000 Subject: [Bug tree-optimization/32826] New: Reduction into a global variable causes a Load Hit Store Hazard (for the Cell) X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia 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: 2007-07/txt/msg02009.txt.bz2 Testcase (compile at -O2 -maltivec -ftree-vectorize): int a[16*100]; int e; float f(void) { int i; int e1; e1 = e; for(i = 0;i<16*100;i++) e1 += a[i]; e = e1; } ----------- cut ------ Currently you get: stvewx v1,0,r2 lis r2,ha16(_e) lwz r0,-20(r1) <---- LHS hazard stw r0,lo16(_e)(r2) Even though the elements of v1 will all be the same, so GCC could do: lis r2,ha16(_e) add r2, lo16(_e)(r2) stvewx v1,0,r2 -- Summary: Reduction into a global variable causes a Load Hit Store Hazard (for the Cell) Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org GCC target triplet: powerpc*-*-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32826