From patchwork Fri Jan 21 04:51:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jeff Law X-Patchwork-Id: 50295 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 F35DB385780A for ; Fri, 21 Jan 2022 04:51:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F35DB385780A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1642740719; bh=NMwt+lwiuApnnUQx6R2DuOmcONTSQZFJP0N8i6n3d2s=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=FMNqCNm7SHZ9FisDDWHvdXdT413s5j6zjjssWfpltGbX1zO6Mgfb2As1OxNMN0OrS cU3uPDJiI/5VHB2h3mIc7gRcGlPICDemhai0/e0th4oLOCGUdblSBqXlzbEQlWPrXp iRa02/OwF+zItKQRDzh64aL/nxlBdxNw+EyqUM2g= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id C8C793858C60 for ; Fri, 21 Jan 2022 04:51:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C8C793858C60 Received: by mail-pl1-x633.google.com with SMTP id h13so6798636plf.2 for ; Thu, 20 Jan 2022 20:51:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:from:subject:to; bh=NMwt+lwiuApnnUQx6R2DuOmcONTSQZFJP0N8i6n3d2s=; b=r1P2qA39TfVtx9KbwLmliUsJbXb4vsSaiTLJrnDnBPSB3D/gBBWdW1UQM1mhbDBcBL p4Xzao3bB/wnkGMbA3yunBB6n+NWWra9VqavBo2VDiYHTD1YnDyuM+DBo6IKdQdyRFRf 0iLML/+Wmm/+qIVuUSL4fWh2abBijchmVmqRISO/Yp7aqAbJ1BnCm9BwybFKAlWl9xMu zLopU+ZSuz5qvqtVst1UzAC9dUwavEO8IuptfktDhul+ELIgNpzQuKp3f/tk7li2XxIK T+9YRqMQoKUXbbG2Z5+QbEBn/L6rC6farv6MRubjQdYmCGNR13uGXKZ0tkQc0Ax+TbqQ aLoA== X-Gm-Message-State: AOAM5317eJs3Yc3Vj85GoviEPtBMfI1JH/cS0qi834EboeJqGRD4kBih wJyj7COfjdlYiHITWesk2PjpeONZiH0= X-Google-Smtp-Source: ABdhPJxXcO0lKNARn7hqcyO++68T3K+xvpiPib7YKg9JNywCSBY0zjXzl6TTtmy+lGEukUFu170g2w== X-Received: by 2002:a17:90b:1108:: with SMTP id gi8mr2843879pjb.222.1642740688412; Thu, 20 Jan 2022 20:51:28 -0800 (PST) Received: from [172.31.0.204] (c-73-63-24-84.hsd1.ut.comcast.net. [73.63.24.84]) by smtp.gmail.com with ESMTPSA id j12sm3734734pgg.4.2022.01.20.20.51.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Jan 2022 20:51:27 -0800 (PST) Message-ID: <961fa5dd-aa9f-a267-a176-a706786d6e3b@gmail.com> Date: Thu, 20 Jan 2022 21:51:26 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Content-Language: en-US Subject: [committed] Fix expected output for various MIPS multiplication tests To: GCC Patches X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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" The recent multiply-highpart work twiddled code generation on the MIPS targets and is causing mips.exp failures. The resultant code is actually better and matches a comment in the test files which indicates that it would be better to generate a mult-highpart.  So I'm pretty confident in removing the undesired mflo & changing the name of the target pattern we expect to see. This fixes the mips64 and mips64el failures in my tester.  I suspect it'll also fix the failures on mipsisa32, but that target is bootstrapped with qemu -- which takes forever so it only runs once a week ;-) Committed. Jeff commit 6f45deb2aed804b185e7dabd2392bfbe14e9bb57 Author: Jeff Law Date: Thu Jan 20 23:48:03 2022 -0500 [committed] Fix expected output for various MIPS multiplication tests The recent multiply-highpart work twiddled code generation on the MIPS targets and is causing mips.exp failures. The resultant code is actually better and matches a comment in the test files which indicates that it would be better to generate a mult-highpart. So I'm pretty confident in removing the undesired mflo & changing the name of the target pattern we expect to see. This fixes the mips64 and mips64el failures in my tester. I suspect it'll also fix the failures on mipsisa32, but that target is bootstrapped with qemu -- which takes forever so it only runs once a week ;-) gcc/testsuite * gcc.target/mips/fix-r4000-2.c: Update expected output. * gcc.target/mips/fix-r4000-3.c: Update expected output. Add -fexpensive-optimizations for consistency in output. * gcc.target/mips/fix-r4000-7.c: Update expected output. * gcc.target/mips/fix-r4000-8.c: Update expected output. diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-2.c b/gcc/testsuite/gcc.target/mips/fix-r4000-2.c index 4290d5f7fab..e0e65d60f42 100644 --- a/gcc/testsuite/gcc.target/mips/fix-r4000-2.c +++ b/gcc/testsuite/gcc.target/mips/fix-r4000-2.c @@ -4,6 +4,4 @@ typedef int int32_t; typedef long long int64_t; NOMIPS16 int32_t foo (int32_t x, int32_t y) { return ((int64_t) x * y) >> 32; } -/* ??? A highpart pattern would be a better choice, but we currently - don't use them. */ -/* { dg-final { scan-assembler "[concat {\tmult\t\$[45],\$[45][^\n]+mulsidi3_32bit_r4000\n\tmflo\t\$3\n\tmfhi\t\$2\n}]" } } */ +/* { dg-final { scan-assembler "[concat {\tmult\t\$[45],\$[45][^\n]+smulsi3_highpart_internal\n\tmfhi\t\$2\n}]" } } */ diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-3.c b/gcc/testsuite/gcc.target/mips/fix-r4000-3.c index 5bc8fc8ddd4..ec9d655dcfc 100644 --- a/gcc/testsuite/gcc.target/mips/fix-r4000-3.c +++ b/gcc/testsuite/gcc.target/mips/fix-r4000-3.c @@ -1,8 +1,6 @@ -/* { dg-options "-mips1 -mfix-r4000 -dp -EB" } */ +/* { dg-options "-mips1 -mfix-r4000 -dp -EB -fexpensive-optimizations" } */ /* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */ typedef unsigned int uint32_t; typedef unsigned long long uint64_t; NOMIPS16 uint32_t foo (uint32_t x, uint32_t y) { return ((uint64_t) x * y) >> 32; } -/* ??? A highpart pattern would be a better choice, but we currently - don't use them. */ -/* { dg-final { scan-assembler "[concat {\tmultu\t\$[45],\$[45][^\n]+umulsidi3_32bit_r4000\n\tmflo\t\$3\n\tmfhi\t\$2\n}]" } } */ +/* { dg-final { scan-assembler "[concat {\tmultu\t\$[45],\$[45][^\n]+umulsi3_highpart_internal\n\tmfhi\t\$2\n}]" } } */ diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-7.c b/gcc/testsuite/gcc.target/mips/fix-r4000-7.c index 25178db9070..9b1057774e9 100644 --- a/gcc/testsuite/gcc.target/mips/fix-r4000-7.c +++ b/gcc/testsuite/gcc.target/mips/fix-r4000-7.c @@ -4,6 +4,4 @@ typedef long long int64_t; typedef int int128_t __attribute__((mode(TI))); NOMIPS16 int64_t foo (int64_t x, int64_t y) { return ((int128_t) x * y) >> 64; } -/* ??? A highpart pattern would be a better choice, but we currently - don't use them. */ -/* { dg-final { scan-assembler "[concat {\tdmult\t\$[45],\$[45][^\n]+mulditi3_r4000\n\tmflo\t\$3\n\tmfhi\t\$2\n}]" } } */ +/* { dg-final { scan-assembler "[concat {\tdmult\t\$[45],\$[45][^\n]+smuldi3_highpart_internal\n\tmfhi\t\$2\n}]" } } */ diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-8.c b/gcc/testsuite/gcc.target/mips/fix-r4000-8.c index eae148817ce..1ce35df3014 100644 --- a/gcc/testsuite/gcc.target/mips/fix-r4000-8.c +++ b/gcc/testsuite/gcc.target/mips/fix-r4000-8.c @@ -1,8 +1,6 @@ -/* { dg-options "-march=r4000 -mfix-r4000 -mgp64 -dp -EB" } */ +/* { dg-options "-march=r4000 -mfix-r4000 -mgp64 -dp -EB -fexpensive-optimizations" } */ /* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */ typedef unsigned long long uint64_t; typedef unsigned int uint128_t __attribute__((mode(TI))); NOMIPS16 uint64_t foo (uint64_t x, uint64_t y) { return ((uint128_t) x * y) >> 64; } -/* ??? A highpart pattern would be a better choice, but we currently - don't use them. */ -/* { dg-final { scan-assembler "[concat {\tdmultu\t\$[45],\$[45][^\n]+umulditi3_r4000\n\tmflo\t\$3\n\tmfhi\t\$2\n}]" } } */ +/* { dg-final { scan-assembler "[concat {\tdmultu\t\$[45],\$[45][^\n]+umuldi3_highpart_internal\n\tmfhi\t\$2\n}]" } } */