From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by sourceware.org (Postfix) with ESMTPS id 574FF384402B for ; Mon, 12 Jul 2021 19:37:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 574FF384402B Received: by mail-lf1-x12e.google.com with SMTP id b26so13162521lfo.4 for ; Mon, 12 Jul 2021 12:37:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yzPzulTg3rbPuJtxGze3V9dZQz5KYsdcrDYwILWkejU=; b=mX6itqsMdi4v14X0g95nMVw8EXRXw4250LsYxpKI4A6u85b28GYrVonhADib5cLkNP TyCNP7dW/LVZ3DiZmmTlgKFrsxjDWq8XZO2ue7vpwndg7BCrtst/7zBJze86LDmVh9Xd ZC+J4/eVjvTQRYQQgJYXzjMqd8v2yrXud7Myr6xgIcf76Z6pVZgdFBa2t0FVkiOM+0NI ygYezdGjvXrUf5Z6Sctzy4jxkb/juvo8yBQ4UhhBAwxVX4JprZH4lXOdWLV8EpHD1SP7 e6V6k9dt1dywwpkKcTQsAPXkrbhqjTQChn+HRk7tJGwRdv/Hm7qxwmkjkW+I/STMp9Gs xTmQ== X-Gm-Message-State: AOAM533KZGtfqtcHWNl+K/JCzmoA3PxgG6U02bFXbA4zIpN212wFsF9L LAFkY2L/nrwyyG2V2ukqO5p1tnCWzFcR5fs6FFw= X-Google-Smtp-Source: ABdhPJynTGMBMugtEaufZcOEQvMxeUctV36YIcKM2Xoz4U+EUll7PBnK9/cmROeHxXIe733JLI9eG6AhG92o+yOgvWg= X-Received: by 2002:a05:6512:dc:: with SMTP id c28mr299545lfp.660.1626118665035; Mon, 12 Jul 2021 12:37:45 -0700 (PDT) MIME-Version: 1.0 References: <20210707195953.GA28745@ibm-toto.the-meissners.org> In-Reply-To: From: David Edelsohn Date: Mon, 12 Jul 2021 15:37:32 -0400 Message-ID: Subject: Re: Repost: [PATCH] Change rs6000_const_f32_to_i32 return type. To: Bill Schmidt , Michael Meissner Cc: GCC Patches , Segher Boessenkool , Peter Bergner , Will Schmidt Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2021 19:37:47 -0000 On Mon, Jul 12, 2021 at 12:07 PM Bill Schmidt wrote: > > Hi Mike, > > On 7/7/21 2:59 PM, Michael Meissner wrote: > > [PATCH] Change rs6000_const_f32_to_i32 return type. > > > > The function rs6000_const_f32_to_i32 called REAL_VALUE_TO_TARGET_SINGLE > > with a long long type and returns it. This patch changes the type to long > > which is the proper type for REAL_VALUE_TO_TARGET_SINGLE. > > > > 2021-07-07 Michael Meissner > > > > gcc/ > > * config/rs6000/rs6000-protos.h (rs6000_const_f32_to_i32): Change > > return type to long. > > * config/rs6000/rs6000.c (rs6000_const_f32_to_i32): Change return > > type to long. > > --- > > gcc/config/rs6000/rs6000-protos.h | 2 +- > > gcc/config/rs6000/rs6000.c | 6 ++++-- > > 2 files changed, 5 insertions(+), 3 deletions(-) > > > > diff --git a/gcc/config/rs6000/rs6000-protos.h b/gcc/config/rs6000/rs6000-protos.h > > index 9de294d3b28..94bf961c6b7 100644 > > --- a/gcc/config/rs6000/rs6000-protos.h > > +++ b/gcc/config/rs6000/rs6000-protos.h > > @@ -281,7 +281,7 @@ extern void rs6000_asm_output_dwarf_pcrel (FILE *file, int size, > > const char *label); > > extern void rs6000_asm_output_dwarf_datarel (FILE *file, int size, > > const char *label); > > -extern long long rs6000_const_f32_to_i32 (rtx operand); > > +extern long rs6000_const_f32_to_i32 (rtx operand); > > > > /* Declare functions in rs6000-c.c */ > > > > diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c > > index 9a5db63d0ef..de11de5e079 100644 > > --- a/gcc/config/rs6000/rs6000.c > > +++ b/gcc/config/rs6000/rs6000.c > > @@ -27936,10 +27936,12 @@ rs6000_invalid_conversion (const_tree fromtype, const_tree totype) > > return NULL; > > } > > > > -long long > > +/* Convert a SFmode constant to the integer bit pattern. */ > > + > > +long > > rs6000_const_f32_to_i32 (rtx operand) > > { > > - long long value; > > + long value; > > const struct real_value *rv = CONST_DOUBLE_REAL_VALUE (operand); > > > > gcc_assert (GET_MODE (operand) == SFmode); > > These changes look OK. Can you please also fix the expander for > xxspltiw_v4sf, which incorrectly expects a long long? > > I can't approve, but recommend approval with that also fixed. This is okay with the fix to xxspltiw_v4sf in altivec.md. And please update the ChangeLog appropriately. Thanks, David