From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id 3B3D93858C2F for ; Sat, 2 Jul 2022 17:15:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3B3D93858C2F Received: by mail-pl1-x630.google.com with SMTP id c13so1314041pla.6 for ; Sat, 02 Jul 2022 10:15:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=DBwByrWVH77yHzVm8LSFBPT+7YM8Un+AD1hBIFH64kE=; b=BvEFHA0w499f2tFwBNZo+3DIyrgGiDSEE2qMwOx1RcnYxJL+9ai4da6n3ez6WkfTHA GMyemkcWQ9H0o/cJbXo7Q48xxfmJeUZ1UNn6mlw3/0WkhGgOnOZ0blMlicCNI4fF6Jg9 qaYiGZyfqreeA/fzS66TPM0KeKWnBDN4gkv7ljkfTd2bqjfVflFbVyThmESmHmwAEGTV hW95UwT+03neSTRdzyv0UZOL9GSRiT+ptDoVY0gLqnvdlpBd4NKv6u+ejWJuKmOrinW3 nGcay3vqqHtOq0QmJkD3vAI3YHZNa/Fag2xHBb9OQUQtrbrmoO0hdC/6X0XGIe9CQ6zJ 1ghw== X-Gm-Message-State: AJIora99T20IvKRRiFNWWlaamNTvYJyxJUPV1t7mFJ8w+wAwGxbnlNz/ uOlQSqmDwJnbtMEh6/ZH8E/k6/1IenI= X-Google-Smtp-Source: AGRyM1tbabyy46Z2YMv+2MJhE1qJdbCK+j2Cg95Pd6TpwXB9te0h/++oq2gv3sE3ahPIqETyNNXBDw== X-Received: by 2002:a17:902:d551:b0:16a:2a58:debe with SMTP id z17-20020a170902d55100b0016a2a58debemr26806115plf.65.1656782142047; Sat, 02 Jul 2022 10:15:42 -0700 (PDT) Received: from [192.168.0.23] (65-130-94-229.slkc.qwest.net. [65.130.94.229]) by smtp.gmail.com with ESMTPSA id y5-20020a62ce05000000b0052514384f02sm7095317pfg.54.2022.07.02.10.15.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 02 Jul 2022 10:15:41 -0700 (PDT) Message-ID: Date: Sat, 2 Jul 2022 11:15:40 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH take 2] middle-end: Support ABIs that pass FP values as wider integers. Content-Language: en-US To: Roger Sayle , gcc-patches@gcc.gnu.org References: <028601d8895b$f60bfe40$e223fac0$@nextmovesoftware.com> From: Jeff Law In-Reply-To: <028601d8895b$f60bfe40$e223fac0$@nextmovesoftware.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Sat, 02 Jul 2022 17:15:44 -0000 On 6/26/2022 6:55 AM, Roger Sayle wrote: > Hi Jeff, > Sorry for the long delay getting back to this, but after deeper > investigation, it turns out that your tingling spider senses that > the original patch wasn't updating everywhere that was required > were spot on. Although my nvptx testing showed no problems with -O2, > compiling the same tests with -O0 found several additional assertion > ICEs (exactly where you'd predicted they should/would be). > > Here's a revised patch that updates five locations (up from the > previous two). Finding any remaining locations (if any) might be > easier once folks are able to test things on their targets. > > > This patch has been tested on x86_64-pc-linux-gnu with make bootstrap > and make -k check with no new failures, and on nvptx-none, where it is > the middle-end portion of a pair of patches to allow the default ISA to > be advanced. Ok for mainline? > > > 2022-06-26 Roger Sayle > > gcc/ChangeLog > PR target/104489 > * calls.cc (precompute_register_parameters): Allow promotion > of floating point values to be passed in wider integer modes. > (expand_call): Allow floating point results to be returned in > wider integer modes. > * cfgexpand.cc (expand_value_return): Allow backends to promote > a scalar floating point return value to a wider integer mode. > * expr.cc (expand_expr_real_1) : Likewise, allow > backends to promote scalar FP PARM_DECLs to wider integer modes. > * function.cc (assign_parm_setup_stack): Allow floating point > values to be passed on the stack as wider integer modes. OK.  Though please consider factoring the code which reinterprets the original into a new mode.  It looks to me like we've got 5 copies of it now :-) Jeff