From patchwork Sun Oct 16 03:41:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jeff Law X-Patchwork-Id: 58910 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 037CB3857C7D for ; Sun, 16 Oct 2022 03:42:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 037CB3857C7D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665891735; bh=JlAMn/+2V6WvkLveRZ24dv2xCjc/Oj4t1d038wHiJEE=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=cNqlRWxn73kby/3K3+BCsbBDOUfhgw/uQ3YNa3osPIEwCzKRuuXDO7BOS0G9Smk0y aC+An/7QA0CECDPQ6CGfI6gIsYLdO7GjpFqLQiw33Sgom9m4AAUQnaKKvzVrnO3sRG Yy0ZwcTJSuudkTuWXCcrdCy4dHPjX6Dh1if5zFLE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id 3EA0D3858C2C for ; Sun, 16 Oct 2022 03:41:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3EA0D3858C2C Received: by mail-pf1-x42f.google.com with SMTP id i3so8318273pfk.9 for ; Sat, 15 Oct 2022 20:41:46 -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=JlAMn/+2V6WvkLveRZ24dv2xCjc/Oj4t1d038wHiJEE=; b=SNHkY8O1QrKajkxKrgFdZ7s4Flx67NrGISbZCtoOnrxLJEBvE0Mb4xeDWExxhqQQUf RYEN5ubxTUc39AsQZ8KKhIVAiUzn+03Fow6EFCRIOiUIlGhMdtfzl5jZqJGikwYXL2g1 eALyREr7Kf9VxRHgA0JQazgv8IzZKdf5S+xe+R6xHTQ7iUdH+PIz7NEFsDIO0EtFNYtK en4iwX/sxM0wUQfyRlHzXo5MvEUPpt07jqFG3AKKogC24XH0+53DteIHafHFUqElRXkt oiMFOvEfs4Zv8kWfgtZtwfout1cqR2gR2INwNJeV8YVGITzhD7FKubip0AsLDmei5+hi WcTQ== X-Gm-Message-State: ACrzQf2SwQoZ6IaOY1fheFvGw2TRvHqykdxCg2y5xHnaZlFBrGABiAuq +BXcyUJP03xG9SVLWgNlz4ljwZ5qht4= X-Google-Smtp-Source: AMsMyM4+k9DcakvkxDxYZhC6hbfFB6C3XYyFH3qQx6+NVYcoyEyNHsJPQ6EFC34SCG7TLT0rX/d5yQ== X-Received: by 2002:a65:604d:0:b0:43c:9d8c:813a with SMTP id a13-20020a65604d000000b0043c9d8c813amr5224175pgp.572.1665891704776; Sat, 15 Oct 2022 20:41:44 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id k7-20020a170902c40700b001822121c45asm4127206plk.28.2022.10.15.20.41.43 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 15 Oct 2022 20:41:44 -0700 (PDT) Message-ID: <81e45aaf-7e44-fa07-35df-f66d988879ae@gmail.com> Date: Sat, 15 Oct 2022 21:41:42 -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] Fix bug in register move costing on H8/300 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" Spotted while looking at a regression on the H8/300.   We used MAC_REG rather than MAC_REGS when referring to a register class. This caused code quality regressions while looking into Paul K's suggestion for fixing the auto-increment issue on the H8. Pushed to the trunk, Jeff commit 6c3da5ca84ded7c5754183f8d2cad0d01e1562ff Author: Jeff Law Date: Sat Oct 15 23:38:20 2022 -0400 Fix bug in register move costing on H8/300 gcc/ * config/h8300/h8300.cc (h8300_register_move_cost): Fix typo. diff --git a/gcc/config/h8300/h8300.cc b/gcc/config/h8300/h8300.cc index 78cf15f15c7..be3e385c91e 100644 --- a/gcc/config/h8300/h8300.cc +++ b/gcc/config/h8300/h8300.cc @@ -1140,7 +1140,7 @@ static int h8300_register_move_cost (machine_mode mode ATTRIBUTE_UNUSED, reg_class_t from, reg_class_t to) { - if (from == MAC_REGS || to == MAC_REG) + if (from == MAC_REGS || to == MAC_REGS) return 6; else return 3;