From patchwork Thu Jun 1 19:38:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 102161 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp570167vqr; Thu, 1 Jun 2023 12:39:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6AbCFceTknG0yDUfTFY7IcWdvaxKL79tzdBA3KLzXDRMWEPh4c2bktlXoo8MRMu2iqdgqy X-Received: by 2002:a05:6512:3747:b0:4ec:a19c:32b0 with SMTP id a7-20020a056512374700b004eca19c32b0mr545219lfs.5.1685648370418; Thu, 01 Jun 2023 12:39:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685648370; cv=none; d=google.com; s=arc-20160816; b=NYzmwUQdGivSbya/sEoLORLsRveerkAgHeO/PuMtvZRZbs0WzxlwShrNAbBsFu1/ik Csv9VQUv6Juut9cwnRzJliBdc2S+T2/8usMOLf6XTz/sJhwNYe2MxU2/xo2eVbUsbXSa IpsnJTb+d6uK6r3mnf3LIAuMjnxr0ID08J+/4ZQUEa5bqBq22Fifwpx1kPwVQgKkUdYI 4yGFo8ZS+RVVRB74S6+IZcH/yrenCYDB6ygBXeJAp/q4BRHd1Fputc/avkqtxOhnxrh+ x2gGQWIVL4BnWMF0fO3ss+RS02IOFegw/MYgtuya/xIrskr4QxrcNWp+yEBgQFedeOil o/vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dmarc-filter:delivered-to; bh=LAsp6JB3ESDMAlM2KDffo0Uk93yHXDmrTn4rMuxXGAE=; b=0e1qWN2JKCr7KoAfLylJaLkqcu5BP+NLrOhMthkL9hop0fsmFA7kPnVptHXdVDU4fG CCJt7DZ8BfJGacQrIVMSGgofhy0LxrbKVjm6++Lkg6SGTJpywiGWwoiSCKZE+qIjKFHj OJjdoQAEmHsjpuD0pOt8u6LJkWAYKLzTAgAZKAMcX4VO2Yw5IONVessDNn3D6+61j3JW g3Xy9/isC759PTM0hr6oGfurdnNEJDtmo1SEMMCyrq73tznC4Wg6NyFH7vBAyUgwhUOx +9/vCX3yi1/7w4Oi/gl0B5CoWaNKQ0jv+KG99FYfUNzgaE1Exikp1FOPaVuRHHpPoFNV f3Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=LZmMGDhj; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id be16-20020a0564021a3000b00514b39eeb28si2358801edb.407.2023.06.01.12.39.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 12:39:30 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=LZmMGDhj; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 56B333856948 for ; Thu, 1 Jun 2023 19:39:26 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by sourceware.org (Postfix) with ESMTPS id 184DA3858C2C for ; Thu, 1 Jun 2023 19:39:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 184DA3858C2C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-25669acf1b0so1035498a91.0 for ; Thu, 01 Jun 2023 12:39:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1685648340; x=1688240340; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LAsp6JB3ESDMAlM2KDffo0Uk93yHXDmrTn4rMuxXGAE=; b=LZmMGDhj5ReaGm3OxrVzJr1TILOne3+zVOoHcTayhCnMWOlLmH4EG8NKemWtOKBat7 /8WIOz/HmzZykWVHUpsqFC9C1xq/PBlq8pKKporX7uCYsd0doJlPIiygTxhfeeOadE2a B/fka19WlIZgTQYI2dGn54QP86xQ/SpR/tcaFmrRpHHXcfXPkojeGy/LQ/nVyvv7EnJj hqLBt4YTR++g0jyu2q5OR3Jz4rfEbR/xTHmBw3MKq3QRix03zgp6jHLo8mwhVu9Dns/x atK5jVJAsFqG88GlzMyaNMPDbAt9UreLoYmY1ycsDrQOsqqNOS/f1wNx1LU0pO4HTeEe LRiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685648340; x=1688240340; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LAsp6JB3ESDMAlM2KDffo0Uk93yHXDmrTn4rMuxXGAE=; b=FpDR4q9hdG+m++cMfymhxYaL3E6KiS5eLfeCmBJrMNvQ3CDPpSSiWeH7YJsUMSj6lq WQXORnQwMSKtxNs+LDaqfAwh2QK+93ehxBuNZPKI3xLl1o2R8l2SKo81czx2dFfV9FdC SpZfw5/mhF1tZyHt9GWKQsq7hWoEQsmxI93iRrU+B6Anhz67w6IBVLkQP+eRW2bkpzCJ fXSIYRW4LwZ+pF7aRRC6l2pNzi7kARI8ra2lSMfXaS3Tus0VQQiklkthMHbzAjN+SPmW kgj/VjOZ372x0jY0NHNxNGA5JCFCu/6BdKQuW4APcJfBIyFgqfPL8OytXBTaVruHejbJ Ku3Q== X-Gm-Message-State: AC+VfDyzp+WhPixvh6EV/JbST3flhUgFmVTwBYYMbO97a/P80DZTRmGL or2axDkBHHRSegsulwAm58L7Wqw4/cRT5lLt0s4= X-Received: by 2002:a17:90a:fa96:b0:24d:ebfe:be93 with SMTP id cu22-20020a17090afa9600b0024debfebe93mr274540pjb.37.1685648339633; Thu, 01 Jun 2023 12:38:59 -0700 (PDT) Received: from vineet-framework.ba.rivosinc.com ([71.202.114.183]) by smtp.gmail.com with ESMTPSA id j13-20020a17090ae60d00b0024749e7321bsm1781962pjy.6.2023.06.01.12.38.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 12:38:59 -0700 (PDT) From: Vineet Gupta To: gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com, Jeff Law , Palmer Dabbelt , Philipp Tomsich , Christoph Mullner , gnu-toolchain@rivosinc.com, Vineet Gupta Subject: [Committed] testsuite: Unbork multilib setups using -march flags (RISC-V) Date: Thu, 1 Jun 2023 12:38:53 -0700 Message-Id: <20230601193853.160037-1-vineetg@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_SHORT, 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 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: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767530425492835527?= X-GMAIL-MSGID: =?utf-8?q?1767530425492835527?= RISC-V multilib testing is currently busted with follow splat all over: | Schedule of variations: | riscv-sim/-march=rv64imafdc/-mabi=lp64d/-mcmodel=medlow | riscv-sim/-march=rv32imafdc/-mabi=ilp32d/-mcmodel=medlow | riscv-sim/-march=rv32imac/-mabi=ilp32/-mcmodel=medlow | riscv-sim/-march=rv64imac/-mabi=lp64/-mcmodel=medlow ... ... | ERROR: tcl error code NONE | ERROR: torture-init: torture_without_loops is not empty as expected causing insane amount of false failures. | ========= Summary of gcc testsuite ========= | | # of unexpected case / # of unique unexpected case | | gcc | g++ | gfortran | | rv64imafdc/ lp64d/ medlow | 5421 / 4 | 1 / 1 | 6 / 1 | | rv32imafdc/ ilp32d/ medlow | 5422 / 5 | 3 / 2 | 6 / 1 | | rv32imac/ ilp32/ medlow | 391 / 5 | 3 / 2 | 43 / 8 | | rv64imac/ lp64/ medlow | 5422 / 5 | 1 / 1 | 43 / 8 | The error splat itself is from recent test harness improvements for stricter checks for torture-{init,finish} pairing. But the real issue is a latent bug from 2009: commit 3dd1415dc88, ("i386-prefetch.exp: Skip tests when multilib flags contain -march") which added an "early exit" condition to i386-prefetch.exp which could potentially cause an unpaired torture-{init,finish}. The early exit only happens in a multlib setup using -march in flags which is what RISC-V happens to use, hence the reason this was only seen on RISC-V multilib testing. Moving the early exit outside of torture-{init,finish} bracket reinstates RISC-V testing. | rv64imafdc/ lp64d/ medlow | 3 / 2 | 1 / 1 | 6 / 1 | | rv32imafdc/ ilp32d/ medlow | 4 / 3 | 3 / 2 | 6 / 1 | | rv32imac/ ilp32/ medlow | 3 / 2 | 3 / 2 | 43 / 8 | | rv64imac/ lp64/ medlow | 5 / 4 | 1 / 1 | 43 / 8 | gcc/testsuite: * gcc.misc-tests/i386-prefetch.exp: Move early return outside the torture-{init,finish} Signed-off-by: Vineet Gupta --- gcc/testsuite/gcc.misc-tests/i386-prefetch.exp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp b/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp index ad9e56a54bcf..98aab506cba0 100644 --- a/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp +++ b/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp @@ -14,6 +14,13 @@ # along with GCC; see the file COPYING3. If not see # . +if { [board_info target exists multilib_flags] + && [string match "* -march=*" " [board_info target multilib_flags] "] } { + # Multilib flags come after the -march flags we pass and override + # them, so skip these tests when such flags are passed. + return +} + # Test that the correct data prefetch instructions (SSE or 3DNow! variant, # or none) are used for various i386 cpu-type and instruction set # extension options for __builtin_prefetch. When using -mtune, specify @@ -90,13 +97,6 @@ load_lib torture-options.exp dg-init torture-init -if { [board_info target exists multilib_flags] - && [string match "* -march=*" " [board_info target multilib_flags] "] } { - # Multilib flags come after the -march flags we pass and override - # them, so skip these tests when such flags are passed. - return -} - set-torture-options $PREFETCH_NONE gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/i386-pf-none-*.c]] "" ""