From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6309 invoked by alias); 12 May 2011 05:35:12 -0000 Received: (qmail 6286 invoked by uid 22791); 12 May 2011 05:35:10 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 12 May 2011 05:34:57 +0000 From: "hp at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/48974] New: VIS intrinsics improvement opportunities X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: hp at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Thu, 12 May 2011 05:35:00 -0000 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: 2011-05/txt/msg00986.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48974 Summary: VIS intrinsics improvement opportunities Product: gcc Version: 4.7.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: target AssignedTo: unassigned@gcc.gnu.org ReportedBy: hp@gcc.gnu.org Target: sparc64-*-* While writing a VIS backend for RAPP, http://savannah.nongnu.org/projects/rapp/ using gcc54 at the compilefarm I noticed a few omissions and opportunities for improvements. I just thought adding some notes here would be better than nothing, before I forget. 1. The insns fone / fones are unused (in contrast to fzero / fzeros). 2. The implicit dependency on the GSR control register from the fpack* and faligndata insns aren't expressed in the intrinsics. There's also no way to set GSR other than through an asm (or by __builtin_vis_alignaddr, for the side-effect of setting the GSR.alignaddr_offset field). This makes those intrinsics next to useless compared to naked asms. An intuitive way to set GSR for those intrinsics would be as a parameter to the fpack* and faligndata intrinsics (or rather, new variants), and generating a CSE:able setting of GSR when expanding the intrinsic (and changing the __builtin_vis_alignaddr to be a parallel, setting the same pseudo or just clobbering it). See the initial-value machinery and its use in various ports for managing a suitable pseudo for a hard-register; get_hard_reg_initial_val and friends.