From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22825 invoked by alias); 6 Dec 2005 21:07:22 -0000 Received: (qmail 22574 invoked by uid 48); 6 Dec 2005 21:07:20 -0000 Date: Tue, 06 Dec 2005 21:07:00 -0000 Subject: [Bug target/25287] New: PPC has conditional indirect jumps if ra allocates the a in ctr before the jumps 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-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2005-12/txt/msg00612.txt.bz2 List-Id: Code: int f(void *a, int b) { if (b ==1) goto *a; g(); if (b ==2) goto *a; g(); return 1 } This is very minor but I thought it would be cool if GCC could do something like: .f: mflr %r0 cmpwi %cr7,%r4,1 std %r30,-16(%r1) std %r31,-8(%r1) mr %r30,%r3 mr %r31,%r4 std %r0,16(%r1) stdu %r1,-128(%r1) mtctr %r30 beqctr %cr7,.L3 bl .g nop cmpwi %cr7,%r31,2 mtctr %r30 beqctr %cr7,.L3 bl .g li %r3 blr .L3: mtctr %r30 bctr -- Summary: PPC has conditional indirect jumps if ra allocates the a in ctr before the jumps Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org GCC target triplet: powerpc64-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25287