From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4381 invoked by alias); 4 Mar 2005 03:42:02 -0000 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 Received: (qmail 4315 invoked by uid 48); 4 Mar 2005 03:41:54 -0000 Date: Fri, 04 Mar 2005 03:42:00 -0000 Message-ID: <20050304034154.4314.qmail@sourceware.org> From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040817140542.17064.pbrook@gcc.gnu.org> References: <20040817140542.17064.pbrook@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug tree-optimization/17064] -falias-noargument-global doesn't eliminate dead stores/loads X-Bugzilla-Reason: CC X-SW-Source: 2005-03/txt/msg00464.txt.bz2 List-Id: ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-04 03:41 ------- Here is a testcase which we semi optimize on the RTL level but not at the tree level: sum cannot alias a or b at all because of the default option for gfortran. subroutine dot_product (sum, a, b, n) real*8 a(n), b(n), sum sum = 0 do i = 1, n sum = sum + a (i) * b(i) end do end The reason why I say semi is because there is an extra fmr (PPC): The loop looks like: L4: lfd f13,0(r4) addi r4,r4,8 lfd f0,0(r5) addi r5,r5,8 fmadd f0,f13,f0,f12 fmr f12,f0 bdnz L4 If we had optimizate it at the tree level it would look like: L4: lfd f13,0(r4) addi r4,r4,8 lfd f0,0(r5) addi r5,r5,8 fmadd f12,f13,f0,f12 bdnz L4 Note how we don't have the extra fmr. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17064