From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by sourceware.org (Postfix) with ESMTPS id 42B7B3858D1E for ; Mon, 9 Jan 2023 14:01:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 42B7B3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-x1033.google.com with SMTP id z4-20020a17090a170400b00226d331390cso9572271pjd.5 for ; Mon, 09 Jan 2023 06:01:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=v3TgmnbKaFB6pKb1GXUOpMtgbVlQKGtsH0Hl5eBimNA=; b=KLjBgT/AawMYLOVBT/gVul7WhaiwabeXO/Bwrxb+CK+MLatjLGiVxW4OdZ+YCpSaW6 4VyOEN52TXIarLkhcfbhJMwJDBn4ppBSEotja9EP+ZofatHn9HPwy/NLY6JYBd8mvTk5 SxydDDCzFTVO0xIoAf9Rh2eHfTmnEcXzXKNteqp/QOQann3uXhFAmpHZowWYhfjeV6kw nRDGf9/1iEVXAg2ZR/cIXo9dCd0NzrSQETDUa8xflPoUhbbBRwoBfneDFHhw+5Ul0XjW AkEWKX67MOTzaPenZasY1HI7ULs5BskIMAJM+HKlbHdYVQD9zm3T7PdkqodbMF9JG0qK mbqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=v3TgmnbKaFB6pKb1GXUOpMtgbVlQKGtsH0Hl5eBimNA=; b=ibBn8rZZH/Vnc6xuHdiwOnoc7W5L/mgnjxeIpI3Hz4Ovmf/vcS7tpYoWVoPyWKZh7L /eoI0E5Hn9VK7/B7wvy0lCEPrQ+gQzTL/aNpdUz+TYSW5mDN8TV82O/3ZRo5uS3bki4Z N8ZGQkh2G1a9hRejTHaj9VJxgR9S76vQGO9swwTyN2EbXjc8PCWUkaQaavWp1+DyynKW qZeTXFbMF9JPfgLc1XI9nIvZ1s8OVOQcDPF87Pl80h+lk3Mr3NiyBDlm4Kwf2u6C/EYl QtRXAgZs9g1sx6GT8SLJpeb0vGerxnGD3eFxxyKWBTqaWa6EwZI65Zb40z0He7VjFXa9 S7NQ== X-Gm-Message-State: AFqh2kr7RxUuTU+rJ/a4Tj7Elfe3S0X418Je1UgKHUBRL55+RSzV58KD zgIoEcarIFugzFtiTxa8PUE= X-Google-Smtp-Source: AMrXdXuAZHG7AmRQ9NH9NMdHKrHDEdIKKnB4M8cuO3snj+6556O4LI4KLfBrXwhaztHY+kURRyEKJg== X-Received: by 2002:a17:902:e544:b0:193:3980:98d4 with SMTP id n4-20020a170902e54400b00193398098d4mr1883449plf.22.1673272886016; Mon, 09 Jan 2023 06:01:26 -0800 (PST) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id ij18-20020a170902ab5200b00176e6f553efsm6144650plb.84.2023.01.09.06.01.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Jan 2023 06:01:25 -0800 (PST) Message-ID: Date: Mon, 9 Jan 2023 07:01:23 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH] expr.cc: avoid unexpected side effects in expand_expr_divmod optimization Content-Language: en-US To: Jakub Jelinek , Richard Biener Cc: "Jose E. Marchesi" , gcc-patches@gcc.gnu.org, david.faust@oracle.com References: <20221208105944.660323-1-jose.marchesi@oracle.com> <87y1rixd3n.fsf@oracle.com> <87cz8ttt88.fsf@oracle.com> <87zgaysmky.fsf@oracle.com> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_STOCKGEN,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 1/9/23 02:57, Jakub Jelinek via Gcc-patches wrote: > On Mon, Jan 09, 2023 at 09:05:26AM +0100, Richard Biener wrote: >> On Wed, Jan 4, 2023 at 9:54 AM Jose E. Marchesi via Gcc-patches >> wrote: >>> >>> >>> ping. >>> Would this be a good approach for fixing the issue? >> >> adding the is_libcall bit enlarges rtx_def by 8 bytes - there's no room for more >> bits here. > > That is obviously not the way to go, sure. > >> I really wonder how other targets avoid the issue you are pointing out? >> Do their assemblers prune unused (extern) .global? > > I think no target solves this, if they see an extern call during expansion > and emit some directive for those, they emit the global or whatever directive > which remains there. > > If all bits for CALL_INSN are taken, can't we add a flag on the CALL > rtx inside of the CALL_INSN pattern? Or a flag on the SYMBOL_REF inside of > it (libcalls are always direct calls, aren't they) or SYMBOL_REF_FLAGS ? You might look at 32bit PA SOM. It was always a bit odd in this respect. You had to import every external symbol explicitly and it disliked importing something that wasn't used. I recall some special handling for libcalls as well. Jeff