From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13430 invoked by alias); 13 Nov 2004 17:54:27 -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 13411 invoked by uid 48); 13 Nov 2004 17:54:24 -0000 Date: Sat, 13 Nov 2004 17:54:00 -0000 Message-ID: <20041113175424.13410.qmail@sourceware.org> From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20041113170938.18463.steven@gcc.gnu.org> References: <20041113170938.18463.steven@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug tree-optimization/18463] [4.0 Regression] Moving floating point through an integer register X-Bugzilla-Reason: CC X-SW-Source: 2004-11/txt/msg01660.txt.bz2 List-Id: ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-13 17:54 ------- For PPC at least IV-OPTS should note that we have post increment and decrement the pointers before the loop and then increment all of them inside the loop, aka: void fcpy(float *restrict a, float *restrict b, float *restrict aa, float *restrict bb, unsigned n) { unsigned i; aa-=1; a-=1; bb-=1; b-=1; for(i = 0; i < n; i++) { aa+=1; a+=1; bb+=1; b+=1; *bb=*b; *aa=*a; } } So we get: L4: lfsu f0,4(r4) lfsu f13,4(r3) stfsu f0,4(r6) stfsu f13,4(r5) bdnz L4 which is the most optimal for PPC -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18463