From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21731 invoked by alias); 11 Sep 2008 23:46:06 -0000 Received: (qmail 21075 invoked by uid 48); 11 Sep 2008 23:44:44 -0000 Date: Thu, 11 Sep 2008 23:46:00 -0000 Subject: [Bug rtl-optimization/37490] New: [4.4 Regression] IRA causes FP code to have more spills 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: 2008-09/txt/msg01418.txt.bz2 I had quickly looked at PR 37488 and decided to try it out on PPC and noticed that IRA generates worse code than what was being generated before. Here is a simple testcase which does not have any indirect gotos in it: void g(void); const void* test(int action, void* ptr, int a, int *b) { if (action == 0) { return 0; } else { char* ip = ptr; double reg_f_a; double reg_f[1]; reg_f_a = 0.0; reg_f[0] = 0.0; if(a) goto L2; L1: { int t1 = *(int*)(++ip); reg_f_a = reg_f_a + reg_f[t1]; g(); if(*(++b)) goto L1; } L2: g(); *(double*)ptr = reg_f_a; } return 0; } --- CUT --- - fmr 31,0 + std 0,128(1) + lfd 31,128(1) - fmr 31,0 - mr 31,4 - addi 29,1,112 + std 0,128(1) + mr 29,4 + lfd 31,128(1) + addi 28,1,112 For some reason IRA decides it is better to use the GPRs for 0.0 than it is to use the FPRs. -- Summary: [4.4 Regression] IRA causes FP code to have more spills Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: rtl-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37490