From patchwork Thu Jul 6 21:36:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 116850 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp2848499vqx; Thu, 6 Jul 2023 14:37:14 -0700 (PDT) X-Google-Smtp-Source: APBJJlEEH+QOU4UVtGBhO7a5a6lp2ikiHnRO7vV4OD8PpfFtK6GVy6ZEb2kuBcekaJXygISIPm+7 X-Received: by 2002:a2e:3507:0:b0:2b6:b611:64e9 with SMTP id z7-20020a2e3507000000b002b6b61164e9mr1841886ljz.52.1688679434736; Thu, 06 Jul 2023 14:37:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688679434; cv=none; d=google.com; s=arc-20160816; b=yrSdJNroP6gwYF+VWQgRMfB7kKqImGG6UZ3QeOXfFw9o7W/5ohjqM4NiYQ4Pe1wQEI 589hyAGTvbILzg+yYUNohHTHpB8EnJrS/2I2gGcz3WISSwLFDGKE+lCw3Ck7r2ZKqoAU 1s71Jm1xmvDYg979bMGxFMSWp1xMaT1emJp2qH8APuM0kvqz6tvbD8jKuFdYrjFsZ8/2 kn8IH8f4Idx6GR7cVkDiU0I0W8hOMB4VBmU5Fe78TwJyABEG+GjlZDFWUyyYbVYCzUNg aPuI8kONBb3SatyqkUHEPSm//L2a02txxQ+sAl3reQOZqdaUf1m3R0nJaRD/jQdNZipK 0djg== 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:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature:dmarc-filter:delivered-to; bh=EwEikqF28TJFiNhgNE+epdWXNulkKR3KvfIJCtLW8Vs=; fh=t3lE6tP4OFFScdyp9Q21zIlkKocPOm4DCGwxv6w9iRc=; b=I6QYIvqKK7JgpeWSt2UMvlHhH3uCE4ZZc+vTEKl8YadOkD6E3EJTws4ELQG9Kl0QXg Qu7+NTygL7R9qSxxmRHgKPaRRuZZdqHOqZv8pY4HRv/Go67PA51kfvIhfmMYuFFq/Jpj sJ+oYRbEe+xrCGmTJz1qcyKx93GKpLM8lhw8RnMDvbv5Jji1wfk+fCyxkSaKvD3Lxnl4 iRzzeXSRfiWS/VwH7xHyNZlhIo38ckomUjY4nMs9RhAv4MQGAsCwhC4TxFExH1yI5B34 4wFotnOA1/WKs4VidADm57ngJHNYbREPkMbMnP+5mFfmEQomJaek0E0O6iQdfjEIm0It 3ySA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=W6CUTGNm; 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id a22-20020aa7cf16000000b0051de2e74786si1237428edy.266.2023.07.06.14.37.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 14:37:14 -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=@embecosm.com header.s=google header.b=W6CUTGNm; 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 72A783855581 for ; Thu, 6 Jul 2023 21:36:40 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by sourceware.org (Postfix) with ESMTPS id BB7A13853D3D for ; Thu, 6 Jul 2023 21:36:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BB7A13853D3D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2b6fbf0c0e2so18047491fa.2 for ; Thu, 06 Jul 2023 14:36:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1688679376; x=1691271376; h=mime-version:user-agent:references:message-id:in-reply-to:subject :cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=EwEikqF28TJFiNhgNE+epdWXNulkKR3KvfIJCtLW8Vs=; b=W6CUTGNmoiRO2C/ljjqMf3yoWmUuzQaLJdELrMU9hzDi5vWnViZmRgaBedDVZpvCp/ 0WPXhmbqATlZl4zPEe+/jaWpSs7Njp1spaH5snSV74R/CKigDd2AmlXWpmPaAvieWKQv 86LQMN0209NKuNao4wpP4KHsr9DcBbLCJKSDJjhKLOM+HlmmXE+5G3NgZUwuzvw3VYcR CK4wsfLTW1SBBUW7w8tYbAMY3renAlTRNxuIqv/iK+sm7CMI6Xyb0vcG4aDN3JkKq2hi mYUX8IgtEFJu1+9PKozTAkFyrZTIxd+6gkcMYxkGeJGoFA6GtTAESFJbUFDn2AgQVgRb wcRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688679376; x=1691271376; h=mime-version:user-agent:references:message-id:in-reply-to:subject :cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=EwEikqF28TJFiNhgNE+epdWXNulkKR3KvfIJCtLW8Vs=; b=euvvg9sJk7kI0LvEEs3I8nNEPDDJF3qdyUEDf4rMM7ou0/3zykdyZrM26oKvT2x6vB 25IBvJaXfzBv2oQuAswK7PLj3rhnxwvExE8CgUy3bkRTudKXgKbSTlz0BpaZF+3UMOdw LYreDC87VLI0ACzOAOG8CPB156HiD3OyLP8LhTlGZSr9z3hQKkfgvSgcI60oizmPkIh4 Y1wI9wnp7eOGXNk4btPpxbdbJtmUT2zqr+VZKNXGO0l2jz1icqSb+W0lKBnk8ouWu88w Ik4G0lCf4Hv3vni2AcE1gRXyN9Zm2CR+LKV+PUCyPmR/CxIrZP/0LZ4kDDsCgf2q3iED kn7Q== X-Gm-Message-State: ABy/qLbwH6Rxe8Rscf5hB95Tn11UcOJinYxFtkmjcwef5bhEg5FKzVMh nHThlmqMV0/kfiqCh4nayYSNgw== X-Received: by 2002:a05:6512:2309:b0:4fb:740a:81ae with SMTP id o9-20020a056512230900b004fb740a81aemr2772335lfu.16.1688679376218; Thu, 06 Jul 2023 14:36:16 -0700 (PDT) Received: from [192.168.219.3] ([78.8.192.131]) by smtp.gmail.com with ESMTPSA id y11-20020a05600c364b00b003f90b9b2c31sm612427wmq.28.2023.07.06.14.36.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Jul 2023 14:36:15 -0700 (PDT) Date: Thu, 6 Jul 2023 22:36:12 +0100 (BST) From: "Maciej W. Rozycki" To: Rainer Orth , Mike Stump cc: gcc-patches@gcc.gnu.org Subject: [PATCH 2/3] testsuite: Require 128-bit vectors for bb-slp-pr95839.c In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no 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?1770708726710329053?= X-GMAIL-MSGID: =?utf-8?q?1770708726710329053?= The bb-slp-pr95839.c test assumes quad-single float vector support, but some targets only support pairs of floats, causing this test to fail with such targets. Limit this test to targets that support at least 128-bit vectors then, and add a complementing test that can be run with targets that have support for 64-bit vectors only. There is no need to adjust bb-slp-pr95839-2.c as 128 bits are needed even for the smallest vector of doubles, so support is implied by the presence of vectors of doubles. gcc/testsuite/ * gcc.dg/vect/bb-slp-pr95839.c: Limit to `vect128' targets. * gcc.dg/vect/bb-slp-pr95839-v8.c: New test. --- gcc/testsuite/gcc.dg/vect/bb-slp-pr95839-v8.c | 14 ++++++++++++++ gcc/testsuite/gcc.dg/vect/bb-slp-pr95839.c | 1 + 2 files changed, 15 insertions(+) gcc-test-bb-slp-pr95839-vect128.diff Index: gcc/gcc/testsuite/gcc.dg/vect/bb-slp-pr95839-v8.c =================================================================== --- /dev/null +++ gcc/gcc/testsuite/gcc.dg/vect/bb-slp-pr95839-v8.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_float } */ +/* { dg-require-effective-target vect64 } */ +/* { dg-additional-options "-w -Wno-psabi" } */ + +typedef float __attribute__((vector_size(8))) v2f32; + +v2f32 f(v2f32 a, v2f32 b) +{ + /* Check that we vectorize this CTOR without any loads. */ + return (v2f32){a[0] + b[0], a[1] + b[1]}; +} + +/* { dg-final { scan-tree-dump "optimized: basic block" "slp2" } } */ Index: gcc/gcc/testsuite/gcc.dg/vect/bb-slp-pr95839.c =================================================================== --- gcc.orig/gcc/testsuite/gcc.dg/vect/bb-slp-pr95839.c +++ gcc/gcc/testsuite/gcc.dg/vect/bb-slp-pr95839.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target vect_float } */ +/* { dg-require-effective-target vect128 } */ /* { dg-additional-options "-w -Wno-psabi" } */ typedef float __attribute__((vector_size(16))) v4f32;