From patchwork Sun Dec 2 11:38:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Peter Nilsson X-Patchwork-Id: 203201 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id B0A812C007D for ; Sun, 2 Dec 2012 22:38:16 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1355053097; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: User-Agent:MIME-Version:Content-Type:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=dz7IyLOFXpIPqapanz1vJ50ugec=; b=vHU3qkzRrPmmPHR 6Lu0EppfaqihcQJ7DL+7iTiCLfBIF+ITMZmjjazjwOe7jA1mSn8KK1E7JYlg/kEJ jiH5PkmWjT/RlEkSuTA21nX7t54+76GAt3nixA+33RGrVecuUkVPULBAEsnfOX0r QeavEcqKGXnxZ134w9FdDdwnU4B4= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:User-Agent:MIME-Version:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=B7m/BgzZ/ykS1S85DWOwcwxY4LXEN+b2X3mNbXr3Qb5KuvXLaRaMrYBp4ufCol 2Lg4aQI0+kI5dFZFdEiZrYKkyAWsG9V12t1mXjXjBTq7mVrpUaNWbCkq/v3GfzJ3 StRf4lbNw9oF59T0XxdrOcUUMF3CN1RNJnlzBs1uHSxbw=; 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, 2 Dec 2012 06:38:02 -0500 (EST) 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 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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. brgds, H-P 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. */