From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24861 invoked by alias); 17 Aug 2006 07:21:37 -0000 Received: (qmail 22894 invoked by uid 48); 17 Aug 2006 07:21:24 -0000 Date: Thu, 17 Aug 2006 07:21:00 -0000 Message-ID: <20060817072124.22893.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug rtl-optimization/21676] [4.0/4.1/4.2 Regression] Optimizer regression: SciMark sparse matrix benchmark In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "uros at kss-loka dot si" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-08/txt/msg01307.txt.bz2 List-Id: ------- Comment #7 from uros at kss-loka dot si 2006-08-17 07:21 ------- (In reply to comment #6) > I think that remaining time difference is due to strange loop above innermost: ... due to strange _header_ above innermost loop ... The problem is that we load zero in both arms of "if". This is what I get in .099t.optimized (using gcc-4.2 -O2 -fno-ivopts): :; r.0 = (unsigned int) r; D.1556 = r.0 * 4; rowR = *((int *) D.1556 + row); rowRp1 = *((int *) D.1556 + row + 4B); if (rowR < rowRp1) goto ; else goto ; :; sum = 0.0; goto (); :; i = rowR; sum = 0.0; Assignment to sum should be moved before if... SSE is able to somehow CSE zero load during RTL: .L8: movl 20(%ebp), %edx movapd %xmm2, %xmm1 movl (%edx,%ebx,4), %eax movl 4(%edx,%ebx,4), %ecx cmpl %ecx, %eax jge .L11 movl %eax, %edx .p2align 4,,7 .L12: -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21676