From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id 3649D3858C52; Tue, 13 Jun 2023 18:59:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3649D3858C52 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-ej1-x62f.google.com with SMTP id a640c23a62f3a-977ed383b8aso929969066b.3; Tue, 13 Jun 2023 11:59:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686682788; x=1689274788; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=kl9tJHtK58XJqWEyE3mKn6BNEDzUdjP3IhjyF4I8+gk=; b=Rt17wSJICasFHWcAIxBSsAhFXYbIcyLLcfY8fJpP9ocAEC4D9zyk6LgKvFoJNaQTV2 s91rYtnch12E3+7iXyPCpd6/iOPB7y4CGwaGmWmpPifa3c8Co+5I1jmknu0G7jHltYXY aTFBzj5LrBgiafO1akVCG0cxcXdj6LYzHhd2A64YWaa5CvQdTe4Ze59ToeY/L8jCarog cacz2SlMYpbJGdF4n9MQbhvdkQRUqkDwabtrdblPcss5Vv/k4dCdu+OmOnSq90HsBfJ1 n6RrSqaaUFTvNwHDqojma1+fDGksv+A7jYbMTtc6WAjsXLl/OpbvLBJ2h/Mmc4yrYdE9 lq9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686682788; x=1689274788; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kl9tJHtK58XJqWEyE3mKn6BNEDzUdjP3IhjyF4I8+gk=; b=FyMwFdVsZRKiO+bXRZU0EdXpeiJCCne+wqBRp5cvhy+zh0r9/YEmLzGGHI5zMs/KTm tXpPfKRBSTYqFR1sR+TVP4BuzT0dpObgo+cRlQEerq2agixQCHaVcNadJSKGM7LZ5D7s gP3Vbu5lcqPBBSkgYXBmzlc07Hv97DmY+Im10ItJtFuvH7Wch2jso9iqkBuKOyLhhtNY hOp0o4pGWxrcvfRh43Yle4kn7TbCthgf/TI+JShzEHFHPVHybkq5vaoedA9CERX8loSo EsrmsVeQ/RaDtjnaWKImH2dt5SqwP53JlY9+oF3Qo6zkVT1V0XijiL+QS0Uxo+GldhEq TAOQ== X-Gm-Message-State: AC+VfDyogluY2qw3ldFoOpFhSo+XaMETcvM86FSCul/49Zk7vorLuNaU S25uuL3UC5QGwTjMBM1ZGKI3ujTdfg1nCUJLAo4= X-Google-Smtp-Source: ACHHUZ5qd7UN9osDKKxVgxPJqDJW9lA8Of3o4AaqtFwcZKaE47Rj07Id4Rz953ik+GZS1nI12PjZ+HZU8AtmOSpeYPk= X-Received: by 2002:a17:906:58cb:b0:978:66bd:d771 with SMTP id e11-20020a17090658cb00b0097866bdd771mr14406570ejs.55.1686682787656; Tue, 13 Jun 2023 11:59:47 -0700 (PDT) MIME-Version: 1.0 References: <20230612131919.269681-1-guojiufu@linux.ibm.com> <7nv8fscdka.fsf@ltcden2-lp1.aus.stglabs.ibm.com> <20230613181446.GT19790@gate.crashing.org> In-Reply-To: <20230613181446.GT19790@gate.crashing.org> From: David Edelsohn Date: Tue, 13 Jun 2023 14:59:35 -0400 Message-ID: Subject: Re: [PATCH] rs6000: replace '(const_int 0)' to 'unspec:BLK [(const_int 0)]' for stack_tie To: Segher Boessenkool Cc: Jiufu Guo , gcc-patches@gcc.gnu.org, linkw@gcc.gnu.org, bergner@linux.ibm.com, rguenther@suse.de, richard.sandiford@arm.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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 List-Id: On Tue, Jun 13, 2023 at 2:16=E2=80=AFPM Segher Boessenkool wrote: > > Hi! > > On Tue, Jun 13, 2023 at 10:15:49AM +0800, Jiufu Guo wrote: > > David Edelsohn writes: > > > > > > This definitely seems to be a better solution. > > > > > > The TARGET_CONST_ANCHOR change should not be part of this patch. Als= o > > > there is no ChangeLog for the patch. > > > > Thanks a lot for your quick review!! And sorry for the sending this pat= ch > > in a hurry. I would update the patch accordingly. > > > > This generally looks correct and consistent with other ports. I want > > > to give Segher a chance to double check it, if he wishes. > > The documentation is very clear that the only thing for which you can > have BLKmode is "mem". Not unspec, only "mem". > > Let's not do this. The existing code has clear and obvious semantics, > which is documented as well -- there is no reason to make it worse in > every respect. Segher, Unfortunately, GCC now is inconsistent and this response is incorrect. The documentation is out of date or was ignored and the "facts on the ground" contradict your review. Yes, (const_int 0) is supposed to be a general no-op and BLKmode only is supposed to be used for MEM, but other major targets (arm, aarch64, riscv, s390) all use unspec:BLK and specifically UNSPEC_TIE. rs6000 is the only port that does not follow this convention. The middle-end has adapted to the behavior of all of the other targets, whether that conformed to the documentation or not. The rs6000 port needs to be fixed and Jiufu's approach is the correct one, consistent with all other targets for stack tie. If the documentation differs, the documentation needs to be updated, not a different approach for the rs6000 port. Jiufu's patch is correct. Thanks, David