From patchwork Tue May 2 09:55:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 89300 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp482738vqo; Tue, 2 May 2023 02:56:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7sWlh7sb0ck6vJw/esM8VLMa93zGWzjcVMEu+20VPtIb65locnrfnlj+LwrtNuBlk6fJkd X-Received: by 2002:a05:6402:2c7:b0:504:921b:825 with SMTP id b7-20020a05640202c700b00504921b0825mr7758366edx.36.1683021364022; Tue, 02 May 2023 02:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683021364; cv=none; d=google.com; s=arc-20160816; b=uob3senzTRLgB5arFF8fOssC+msu3ZwkWY98Ez83rToYvtsTFAAw0QJVKgwG/UH2h5 D8M6o6n5fzFUloRW8g8/Hu98F0vphv7HNwIjed9tbqzuLi1urcuJfMrPFDXokBdrZOc8 lU+uI0CeKVZptxDoGHtr4LqcYVjeHqAGKHB6dg9JjnAeD0TBxf2PZnYB6LQgdEaAhzpB 38P0KXi0vBSWS7tQjgrr7QhFzqNb4zoXpDS858i7Nu8dqrik1zVycgE87ug20NkeEABv Vw+TFUOECAdqk3B83nz4Uyefv5NJ3mAjBeyghPCGN/tzlYlGNZM+kdMsSRTEUyKENbhC esDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:sender:errors-to:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:user-agent:subject:to:date:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=J53yFq62T/L4hqSidm2S7rIakpsOiF8YdEOWXwCIg2U=; b=RkMuPgX3omf8bIYG+2WDQoyx4IuItuN87QdZHLbF5jLtgS3rnbEITTb4EFvyjZvleq hFPRhEXkfdm4PDsNZnz+yVDQCzG45KLX/boFEOr6fd2zBNMBL+l/T7Gl1AIeAHuF43C8 JaKLZypUD4rYq+X5ABKWpJt0Ftdg7JZTNMJELRA/dlaxIBmOoAAxi2Fu1aVRE1G393TJ 4fMMEmRiAEgIEcVoIa5DQeImrr44jo1t6rsuaPl/456rd+6y15cKCdaC3rHzWbi+Qznm bXQ24POJB2PTBw+Cwuztpa32aNmouNMt9oDIEFf+nQARNBaWzOuq7zG3ydo62ADiiB6C CRjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=jmpBZTil; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id g3-20020aa7c583000000b005048bfe57f1si22064799edq.28.2023.05.02.02.56.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 02:56:04 -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=@gcc.gnu.org header.s=default header.b=jmpBZTil; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D2A9B3858C74 for ; Tue, 2 May 2023 09:56:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D2A9B3858C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683021362; bh=J53yFq62T/L4hqSidm2S7rIakpsOiF8YdEOWXwCIg2U=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=jmpBZTilWJgPUInigQeyCUvXBc3PojKIWr8qDMqVWYRRzZ91lQx63aBY3jFZiKbo2 8PgPgNtzby/LYUD2NRF7FHAEmliXnjJt3lTeDrIupepJWFFxbSVZZFvdZHkAXhfLeK xJPoIpd2/N7FUSM9bUzZhoXCqIw9h7aJAvXvU2zU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 8EA993858D1E for ; Tue, 2 May 2023 09:55:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8EA993858D1E Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 98DA122390 for ; Tue, 2 May 2023 09:55:17 +0000 (UTC) Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 8AC1D2C141 for ; Tue, 2 May 2023 09:55:17 +0000 (UTC) Date: Tue, 2 May 2023 09:55:17 +0000 (UTC) To: gcc-patches@gcc.gnu.org Subject: [PATCH] [i386] Fix testcases for emulated scatter User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, MISSING_MID, 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: , X-Patchwork-Original-From: Richard Biener via Gcc-patches From: Richard Biener Reply-To: Richard Biener Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" Message-Id: <20230502095602.D2A9B3858C74@sourceware.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764775809813882883?= X-GMAIL-MSGID: =?utf-8?q?1764775809813882883?= The following adjusts testcases where the pr88531 fail with -m32 because we do not consider MMX size vectorization there and the pr89618 runs into load/store cost differences with -m32. Tested on x86_64-unknown-linux-gnu, pushed. * gcc.target/i386/pr88531-2a.c: Skip scanning for ia32. * gcc.target/i386/pr88531-2b.c: Likewise. * gcc.target/i386/pr88531-2c.c: Likewise. * gcc.target/i386/pr89618-2.c: Likewise. Disable AVX512. --- gcc/testsuite/gcc.target/i386/pr88531-2a.c | 3 ++- gcc/testsuite/gcc.target/i386/pr88531-2b.c | 3 ++- gcc/testsuite/gcc.target/i386/pr88531-2c.c | 3 ++- gcc/testsuite/gcc.target/i386/pr89618-2.c | 4 ++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gcc/testsuite/gcc.target/i386/pr88531-2a.c b/gcc/testsuite/gcc.target/i386/pr88531-2a.c index 8ab2b1385eb..d35855a25e1 100644 --- a/gcc/testsuite/gcc.target/i386/pr88531-2a.c +++ b/gcc/testsuite/gcc.target/i386/pr88531-2a.c @@ -16,4 +16,5 @@ void loop(float * const __restrict__ dst, dst[i] = 42.0 * src[idx[i]]; } -/* { dg-final { scan-assembler-times "mulps" 1 } } */ +/* For ia32 we do not consider V2SFmode vectorization. */ +/* { dg-final { scan-assembler-times "mulps" 1 { target { ! ia32 } } } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr88531-2b.c b/gcc/testsuite/gcc.target/i386/pr88531-2b.c index cdefff2ce8e..ef005a8b690 100644 --- a/gcc/testsuite/gcc.target/i386/pr88531-2b.c +++ b/gcc/testsuite/gcc.target/i386/pr88531-2b.c @@ -3,4 +3,5 @@ #include "pr88531-2a.c" -/* { dg-final { scan-assembler-times "vmulps" 1 } } */ +/* For ia32 we do not consider V2SFmode vectorization. */ +/* { dg-final { scan-assembler-times "vmulps" 1 { target { ! ia32 } } } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr88531-2c.c b/gcc/testsuite/gcc.target/i386/pr88531-2c.c index 17b24c0dacc..bb0eaa09826 100644 --- a/gcc/testsuite/gcc.target/i386/pr88531-2c.c +++ b/gcc/testsuite/gcc.target/i386/pr88531-2c.c @@ -3,4 +3,5 @@ #include "pr88531-2a.c" -/* { dg-final { scan-assembler-times "vmulps" 1 } } */ +/* For ia32 we do not consider V2SFmode vectorization. */ +/* { dg-final { scan-assembler-times "vmulps" 1 { target { ! ia32 } } } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr89618-2.c b/gcc/testsuite/gcc.target/i386/pr89618-2.c index 0b7dcfd8806..c414053b8ec 100644 --- a/gcc/testsuite/gcc.target/i386/pr89618-2.c +++ b/gcc/testsuite/gcc.target/i386/pr89618-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O3 -mavx2 -fdump-tree-vect-details" } */ +/* { dg-options "-O3 -mavx2 -mno-avx512f -fdump-tree-vect-details" } */ void foo (int n, int *off, double *a) { @@ -20,4 +20,4 @@ void foo (int n, int *off, double *a) /* Make sure the cost model selects SSE vectors rather than AVX to avoid too many scalar ops for the address computes in the loop. */ -/* { dg-final { scan-tree-dump "loop vectorized using 16 byte vectors" "vect" } } */ +/* { dg-final { scan-tree-dump "loop vectorized using 16 byte vectors" "vect" { target { ! ia32 } } } } */