From patchwork Mon Oct 17 23:38:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jeff Law X-Patchwork-Id: 58963 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ECB4538582A6 for ; Mon, 17 Oct 2022 23:38:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ECB4538582A6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666049926; bh=1Xl8ivJAQ5U7Lo/UB66AoUyIBg83/D7bzq+cfJOPWdo=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=D7L7GY/ACIqHXMwtl/fVeJ6wsLghCAvNKbqUxZLo554t1kZmQZf2kVdgoxkcyHJwf QxFtMAg7PmVjxQwOH1rKnMTWiVRqxv3zrOMpjIwTeSY4tUAmiKJlUtExspJDCi6pmw 3Dv5bMy5NsP/DLeMVctv20KKt6OtrmMvBOfwUK6Y= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id 7C9583858C50 for ; Mon, 17 Oct 2022 23:38:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7C9583858C50 Received: by mail-pl1-x631.google.com with SMTP id c24so12200844pls.9 for ; Mon, 17 Oct 2022 16:38:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1Xl8ivJAQ5U7Lo/UB66AoUyIBg83/D7bzq+cfJOPWdo=; b=OOtmv07h9UFk8vdFr1kb1KFnEYaEYrMY/P/IKM8JjIoDQtpZfZcQDRsiDrqc77trto jGn8nVzoGEoQlc00dIxIJ4KxDagrNbyvx6DgurzZupfnyHAqZkpfGn+NvKFuM4Z2xiZ9 ZPNgT1yc8p2pLd/jHBgyn6RhlUM5CA/lg2e+Utu3tvOV9zC9OzEfIIH7LobiUfSRphMi eI8ZUQwURErQ/PC6FP/xBrEt+uSemY4lYGBrr1ItgYacyEztxm9KcHmaMf+Xm8ANw51W +ymUsDJ7ZcJbotPUeBkYOos+CJtPMh+WcQuB7TzRsgOSKJFO7A9EuKBU270FtVjvOWVa qcnQ== X-Gm-Message-State: ACrzQf1gA28iAFrsOHtEdK2nlb+b3RuU8FEFYi1DVjM+b2PPHtvZLm0U P7kmzxOTYtMDbDIES+9Nx1FoaUG0GJc= X-Google-Smtp-Source: AMsMyM60LzndK1o/W3Tz1sM8Y0nRqXpIdHVupXuUdrnt9I3u+37xc6JmWTZK4SmPEV2SvUFJrScGzg== X-Received: by 2002:a17:90a:bd01:b0:205:fa9c:1cfc with SMTP id y1-20020a17090abd0100b00205fa9c1cfcmr36338558pjr.116.1666049893044; Mon, 17 Oct 2022 16:38:13 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id w29-20020aa7955d000000b00562657a7b11sm7737638pfq.8.2022.10.17.16.38.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Oct 2022 16:38:12 -0700 (PDT) Message-ID: <0ac60d36-8412-b8fe-44e3-0be5836717df@gmail.com> Date: Mon, 17 Oct 2022 17:38:11 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Content-Language: en-US To: "gcc-patches@gcc.gnu.org" Subject: [committed] Enable REE for H8 X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, 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 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-Patchwork-Original-From: Jeff Law via Gcc-patches From: Jeff Law Reply-To: Jeff Law Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" I was looking at H8 assembly code recently and noticed we had unnecessary extensions.  As it turns out we never enabled redundant extension elimination on the H8.  This patch fixes that oversight (and was the trigger for the failure fixed my the prior patch). Regression tested along with a bit of other in-progress work. Committing to the trunk. Jeff commit 566c5f1aaae120d2283103e68ecf1c1a83dd4459 Author: Jeff Law Date: Mon Oct 17 19:28:00 2022 -0400 Enable REE for H8 I was looking at H8 assembly code recently and noticed we had unnecessary extensions. As it turns out we never enabled redundant extension elimination on the H8. This patch fixes that oversight (and was the trigger for the failure fixed my the prior patch). gcc/common * common/config/h8300/h8300-common.cc (h8300_option_optimization_table): Enable redundant extension elimination at -O2 and above. diff --git a/gcc/common/config/h8300/h8300-common.cc b/gcc/common/config/h8300/h8300-common.cc index bfbda22006b..22e2cfcb7b2 100644 --- a/gcc/common/config/h8300/h8300-common.cc +++ b/gcc/common/config/h8300/h8300-common.cc @@ -32,6 +32,8 @@ static const struct default_options h8300_option_optimization_table[] = and/or variable-cycle branches where (cycle count taken != cycle count not taken). */ { OPT_LEVELS_ALL, OPT_freorder_blocks, NULL, 0 }, + /* Enable redundant extension instructions removal at -O2 and higher. */ + { OPT_LEVELS_2_PLUS, OPT_free, NULL, 1 }, { OPT_LEVELS_NONE, 0, NULL, 0 } };