From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x133.google.com (mail-il1-x133.google.com [IPv6:2607:f8b0:4864:20::133]) by sourceware.org (Postfix) with ESMTPS id C81DE3858C56 for ; Fri, 14 Oct 2022 01:07:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C81DE3858C56 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-il1-x133.google.com with SMTP id a17so1868184ilq.1 for ; Thu, 13 Oct 2022 18:07:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=VwmfHpBvLby7onyHIA/bV8v8X/D7oFRtpifBG0CfODY=; b=d4XU8YRjHBciL+nG1EiMbvQielp408XwLP6kF4I5kfYPRpe1gxPzL2pg3chiz546NK emocVZ752O+sn7W5AYarmZ5KW/dx89oFyJ9d93sqR/QhAtJ+yTMOmPPlMtCShtAUYT3W 7p947DUBnFfH+BDSZDLxShiN/EkN1+MJtX/W9uJ1o94uKEk+BNXO7VZ6OZvl3mZfgWey P68YECZJsqrO/Iqz+EiISQYwmQLRgiphorcZmX+MANaOqENYylaPFbvZ51m1jP6wqoJ7 19d9cyB6Jp4nWXOK8hYKYDuPVaKHDWtlyeMzxL1GEeC41WksQK0ETecccmHhXSY5FBWN Hcfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:from:references: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=VwmfHpBvLby7onyHIA/bV8v8X/D7oFRtpifBG0CfODY=; b=DEK+KMREn4mM7u3R0a2EX/4F/TDp3njDJ4cxeJKyEgiDj+ZBe9ZNKBHbur21DwsOpW uP0GZ61vj3NR/ybo2YAjyahJYPUnc/IKp90+tSxA50tyrLvSjBwkIZoca0gPMuvES4rS kaosOzmx1jbw35/qMSrBLhqQNZBsXPu7bL4m0GYI8/WgwpUVMUivSiq3YoQEEJi0BZEy qwzUGBHfM/6pFbv6fyoVT95UxDd7abHZTvAGC9Y2ZOFmLvyQKERqcI3v/RatdHqP2njl ljZzs4l8ZB5zq6+rov3a4+qphBL80eE7HdWMlsc6IoiwOxU2DdNwe3TEZ1XuGmzi8JzC +OSQ== X-Gm-Message-State: ACrzQf0Ps+8UekeiuLy01LlLvgkYpp4fhjDAbEYViHkJ4Fjh/azzShl0 JLhTXbatgXhKDU+nncybfkMN1XtbP8sJSw== X-Google-Smtp-Source: AMsMyM5YqGv+oy+4Bqral/r5hXGJB7/N/DvaFtoQSUIYoLJKKIrlB3T0CBihR3qBlKXZ21XptGv5qQ== X-Received: by 2002:a05:6e02:18cf:b0:2f8:e698:51c0 with SMTP id s15-20020a056e0218cf00b002f8e69851c0mr1278888ilu.73.1665709646555; Thu, 13 Oct 2022 18:07:26 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id o18-20020a92dad2000000b002e97becb248sm414783ilq.29.2022.10.13.18.07.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 Oct 2022 18:07:25 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------XfeJOMF9ylTaiqdJdYtSVH80" Message-ID: <40062fc8-42d4-40a7-cb53-250af8c98b89@gmail.com> Date: Thu, 13 Oct 2022 19:07:24 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH] Always enable LRA Content-Language: en-US To: gcc-patches@gcc.gnu.org References: From: Jeff Law In-Reply-To: X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This is a multi-part message in MIME format. --------------XfeJOMF9ylTaiqdJdYtSVH80 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 10/13/22 17:56, Segher Boessenkool wrote: > > h8300 fails during GCC build: > /home/segher/src/gcc/libgcc/unwind.inc: In function '_Unwind_SjLj_RaiseException': > /home/segher/src/gcc/libgcc/unwind.inc:141:1: error: could not split insn > 141 | } > | ^ > (insn 69 256 327 (set (mem/f:SI (pre_dec:SI (reg/f:SI 7 sp)) [12 S4 A32]) > (reg/f:SI 7 sp)) "/home/segher/src/gcc/libgcc/unwind.inc":118:12 19 {*movsi} > (expr_list:REG_ARGS_SIZE (const_int 4 [0x4]) > (nil))) > during RTL pass: final > which looks like a backend bug, I don't see a pattern that could split > this (without needing an extra clobber)? I'm aware of this -- its invalid RTL: Uses of the register outside of an address are not permitted within the same insn as a use in an embedded side effect expression because such insns behave differently on different machines and hence must be treated as ambiguous and disallowed. I'd actually tried to turn on LRA for the H8 port a little while ago and stumbled over it. I'm aware of a similar situation involving a general register on the H8, but using reload instead of LRA.  I looked at it a while back and my recollection was that the insn was actually fine until reload got its grubby hands on it.  And when I wandered reload to hunt for anything which handled the restriction noted above, I didn't find anything.  If you were to search for H8 bugs in bugzilla, it should be discoverable. While we could potentially work around this in the backend, it'd be a hack at best.  It hasn't risen to the top of my priority list yet.  I considered suggesting we change this from "invalid" to "target defined" behavior, but that felt like a cop-out. jeff --------------XfeJOMF9ylTaiqdJdYtSVH80--