From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk1-xa34.google.com (mail-vk1-xa34.google.com [IPv6:2607:f8b0:4864:20::a34]) by sourceware.org (Postfix) with ESMTPS id E58F03858415 for ; Tue, 16 Aug 2022 19:58:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E58F03858415 Received: by mail-vk1-xa34.google.com with SMTP id q191so5717558vkb.6 for ; Tue, 16 Aug 2022 12:58:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=rNz/wRVJqWfJEAVQaI9aqwjoHRe5ihMUcUxAHcR1laI=; b=c8uRYiIR1oiv9u9ViV7+ERgruyhnz/w9RQQqoI5uVongaep25TWNi1HnuNlrwspnt8 IPUdcTpHBf5bCF32hk6IoscpAPjeOuL5RJD9fA1AiqLHssfAVeCag9w/eoO5+o1U1ih4 eNhu55/1dFA5855FfAqCmc8uxBIZN+S/seXh/uUDM3vUTYnwzFZsfDRpAM3MTQ0XshuU XIePtUhtQD4/agJEwH6PEHjWuSUokmfL1QLFATcJZRoHr3kBPKMLWOqh1U2kxbg46MaD JqZdYnHk+3dU/wxOE+AhYCW8fevtsZvzMx9b9jTRQO9t3yKNe+Te1SoOMcr1wM71OyZl wUpw== X-Gm-Message-State: ACgBeo1NJKYPQfemCi8rVdZMrgiWw9CcA5D/CrBCpga7vuf02fQeTc2n V7mnpeeci6pTLG0D3neT49nkMnbb8Gq1pkwJYqk= X-Google-Smtp-Source: AA6agR7ibKV+LMiAG8zzWdjYtuul+pJojDbII9heME6HrNDEOJynZnLoeiKmZDMRrAVLBjRMsYCR3i0zx+SRFx6myFY= X-Received: by 2002:a1f:2f8e:0:b0:37c:ed7e:41a7 with SMTP id v136-20020a1f2f8e000000b0037ced7e41a7mr9682518vkv.6.1660679893177; Tue, 16 Aug 2022 12:58:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Max Filippov Date: Tue, 16 Aug 2022 12:58:25 -0700 Message-ID: Subject: Re: [PATCH] xtensa: Prevent emitting integer additions of constant zero To: "Takayuki 'January June' Suwa" Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, FROM_LOCAL_NOVOWEL, HK_RANDOM_ENVFROM, HK_RANDOM_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no 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: Tue, 16 Aug 2022 19:58:16 -0000 Hi Suwa-san, On Tue, Aug 16, 2022 at 5:42 AM Takayuki 'January June' Suwa wrote: > > In a few cases, obviously omitable add instructions can be emitted via > invoking gen_addsi3. > > gcc/ChangeLog: > > * config/xtensa/xtensa.md (addsi3_internal): Rename from "addsi3". > (addsi3): New define_expand in order to reject integer additions of > constant zero. > --- > gcc/config/xtensa/xtensa.md | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) with this change a bunch of tests fail to build with the following error: undefined reference to `__addsi3' E.g. gcc.c-torture/execute/20000519-1.c or gcc.c-torture/execute/20070919-1.c -- Thanks. -- Max