From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30973 invoked by alias); 2 Dec 2012 11:38:09 -0000 Received: (qmail 30963 invoked by uid 22791); 2 Dec 2012 11:38:08 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,KHOP_SPAMHAUS_DROP,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from dair.pair.com (HELO dair.pair.com) (209.68.1.49) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Sun, 02 Dec 2012 11:38:03 +0000 Received: (qmail 78246 invoked by uid 20157); 2 Dec 2012 11:38:02 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 2 Dec 2012 11:38:02 -0000 Date: Sun, 02 Dec 2012 11:38:00 -0000 From: Hans-Peter Nilsson To: Eric Botcazou cc: gcc-patches@gcc.gnu.org Subject: Re: [RFA:] fix group-loads of VOIDmode constants, expr.c:emit_group_load_1 In-Reply-To: <1441413.hk74l6b38W@polaris> Message-ID: References: <1441413.hk74l6b38W@polaris> User-Agent: Alpine 2.02 (BSF 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-12/txt/msg00070.txt.bz2 On Sat, 1 Dec 2012, Eric Botcazou wrote: > > Of course this matters only to >64bit (i.e. >registersize) values like > > TImode, alias __int128. The problem here is that group-loading a > > constant for a function return-value doesn't work; it's passed to > > simplify_gen_subreg which horks on the VOIDmode constant. Thankfully, > > the code below the context handles this case, twice the register-mode, > > just fine, so let's just gate the simplify_gen_subreg call with a test > > for a VOIDmode source. > > IMO that's not as clear a cut as it seems. simplify_gen_subreg is supposed to > work on VOIDmode constants, at least to be callable on them, because there is > the simplify_gen_subreg -> simplify_subreg -> simplify_immed_subreg path. Oops, that parallel I quoted should've had TImode, not VOIDmode. The documentation is pretty clear. Tested as before (but mmix targets only :) Committed. gcc: * config/mmix/mmix.c (mmix_function_value): Set the mode of the returned PARALLEL to that of the return-value, not VOIDmode. Index: gcc/config/mmix/mmix.c =================================================================== --- gcc/config/mmix/mmix.c (revision 192677) +++ gcc/config/mmix/mmix.c (working copy) @@ -754,7 +754,7 @@ mmix_function_value (const_tree valtype, gen_rtx_REG (cmode, first_val_regnum + nregs - 1), const0_rtx); - return gen_rtx_PARALLEL (VOIDmode, gen_rtvec_v (nregs, vec)); + return gen_rtx_PARALLEL (mode, gen_rtvec_v (nregs, vec)); } /* Implements TARGET_LIBCALL_VALUE. */ brgds, H-P