From patchwork Wed Sep 13 14:50:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prathamesh Kulkarni X-Patchwork-Id: 138875 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp1140229vqx; Wed, 13 Sep 2023 07:51:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEbMCLlJoBcRHlEDXaBWJVY4x90IImIeMXV/dHZXkXtxEemXFD8MDlABAvJ3l0LN+BMhk2q X-Received: by 2002:a17:907:1deb:b0:9a1:bd82:de24 with SMTP id og43-20020a1709071deb00b009a1bd82de24mr2128089ejc.12.1694616692527; Wed, 13 Sep 2023 07:51:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694616692; cv=none; d=google.com; s=arc-20160816; b=I4yzHVFonKFywUreoy16ZR9kVj/UagIF32VkLx/8zKzsMFYcAr4ShMTPsFAhbpt2J8 4XiYqGzGej4wRjXxPCQjot8vPosC9T0Z46lG+IUxVNXIdXSTEqfxFg+PenYfWvOyB6GA 1qWC3BIA6Sr1B57WeXwSUsABs+3y4xdtrSU4WMJELr4PN2qt1CTJJs4EAhZIyYrYMoSI k8j71llMhStkd6qiAMtZLRJEafHA7jteRuJMXThNwWMEiGu8Yt3O+GFOVvdVxbkZQXD5 55MZp3YttPBMmmPaxG5PsUQlTpPABndX4YDBmM6ZLzJ4q0z0BVh5VAkmvZOALVO8mvrg 6Okg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:to:subject :message-id:date:mime-version:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=bGgqQTbimB/HA5VqPwataw1rMpLoxWPJQHjkq00CKnc=; fh=g5rjWzYptqnKW2ymcq6XyDfEXrBff1uRLjZL4ZiB2Kc=; b=eCWR30yD+diODcLYguRc8VoJmuMFOBBMJORYRtqpdDOzc6oQknOgB3rhFL2cZwIS/k HF1OyKmmKyNjNgCos+FZzYNN5MezxykIPm24s1Ndfns3U8TF254ZYOQFjwnUmNyGWy9E cx8u+T3xArSpgcllbRcGQdXsxN+JEehDPSDay6DZKRK71K5Jo69WjzNxpC2BM5VduSae KKRxg9F1b8qPqdmIVLzhRmscasdYzqoWIT0oe+5/p8YdlT3GRYf0BzB2246ndHnKSnSi Pzb942nbSAZLbvObQWFmC77e1eU66LNOjekRPF0yN7pslrx3l+kRBOlmVh5Q1C0PTR/W Ywtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=D6SbUWXN; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id t10-20020a170906948a00b009a1b857e3aasi10895442ejx.3.2023.09.13.07.51.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 07:51:32 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=D6SbUWXN; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 2DAC13858D3C for ; Wed, 13 Sep 2023 14:51:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2DAC13858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694616691; bh=bGgqQTbimB/HA5VqPwataw1rMpLoxWPJQHjkq00CKnc=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=D6SbUWXNAgbBSTfHQMyjnMvnyd6PFkfvl/jRTdqsRKfG7QCaBOXP9oRQqsvrDd086 gs3pkN2GGzgzcWo94+yrCWQBGn9eL+WuB1Gq4fev7ZOsbIpH8RKSIibhjXUY3SKPR+ 7y2YEmuZJE0LIcpfeeVRC1cYXcd+81LG5Xr3C78o= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id 0A8D13858D20 for ; Wed, 13 Sep 2023 14:50:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0A8D13858D20 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-307d58b3efbso6329800f8f.0 for ; Wed, 13 Sep 2023 07:50:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694616645; x=1695221445; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=bGgqQTbimB/HA5VqPwataw1rMpLoxWPJQHjkq00CKnc=; b=gaAvK6JVFtwRyOkom7QiFEItYcnTGKbmdM3LCvIiZZHiUV15k5yvqbTc/TBB1yhdRG TVPGquwcJTST8LEelJRIod1wxz/5NUDdDN4u3BPfq6lZm+1Q98yfq1dZOj3Rupm5tYIk 2f2iqqgMdo8wW6sk4UGtiZIZR2rIJii5Vmn1IxL9Bi4b+bGAljw2Wdya9V+WDFF5qp16 s+naaYOnBJqG7VNXDDxL1fVZEGg/OhU5KwePCNfrhTDQxWJHxroRlWAooWRfmuFjChCc SACrgxyCI6cI5gSOgzDhFROw4ZKR4ydRULpngTMlrKiXn4ssZOZl+i8TwLXfkOSNElGK y2PQ== X-Gm-Message-State: AOJu0Yz6X9ov6ZxTS8RaAqy4yexFzfgWyFf42wWoxsr4YUrbLfUpsvHl IkUPLW1yoL7CZf2TsfrWh1St4E4txiVsb108EmbGvQ== X-Received: by 2002:a5d:538f:0:b0:319:67da:ed68 with SMTP id d15-20020a5d538f000000b0031967daed68mr2235776wrv.7.1694616645338; Wed, 13 Sep 2023 07:50:45 -0700 (PDT) MIME-Version: 1.0 Date: Wed, 13 Sep 2023 20:20:08 +0530 Message-ID: Subject: [AArch64][testsuite] Adjust vect_copy_lane_1.c for new code-gen To: Richard Sandiford , Adhemerval Zanella , gcc Patches X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Prathamesh Kulkarni via Gcc-patches From: Prathamesh Kulkarni Reply-To: Prathamesh Kulkarni Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776934392943153377 X-GMAIL-MSGID: 1776934392943153377 Hi, After 27de9aa152141e7f3ee66372647d0f2cd94c4b90, there's a following regression: FAIL: gcc.target/aarch64/vect_copy_lane_1.c scan-assembler-times ins\\tv0.s\\[1\\], v1.s\\[0\\] 3 This happens because for the following function from vect_copy_lane_1.c: float32x2_t __attribute__((noinline, noclone)) test_copy_lane_f32 (float32x2_t a, float32x2_t b) { return vcopy_lane_f32 (a, 1, b, 0); } Before 27de9aa152141e7f3ee66372647d0f2cd94c4b90, it got lowered to following sequence in .optimized dump: [local count: 1073741824]: _4 = BIT_FIELD_REF ; __a_5 = BIT_INSERT_EXPR ; return __a_5; The above commit simplifies BIT_FIELD_REF + BIT_INSERT_EXPR to vector permutation and now thus gets lowered to: [local count: 1073741824]: __a_4 = VEC_PERM_EXPR ; return __a_4; Since we give higher priority to aarch64_evpc_zip over aarch64_evpc_ins in aarch64_expand_vec_perm_const_1, it now generates: test_copy_lane_f32: zip1 v0.2s, v0.2s, v1.2s ret Similarly for test_copy_lane_[us]32. The attached patch adjusts the tests to reflect the change in code-gen and the tests pass. OK to commit ? Thanks, Prathamesh diff --git a/gcc/testsuite/gcc.target/aarch64/vect_copy_lane_1.c b/gcc/testsuite/gcc.target/aarch64/vect_copy_lane_1.c index 2848be564d5..811dc678b92 100644 --- a/gcc/testsuite/gcc.target/aarch64/vect_copy_lane_1.c +++ b/gcc/testsuite/gcc.target/aarch64/vect_copy_lane_1.c @@ -22,7 +22,7 @@ BUILD_TEST (uint16x4_t, uint16x4_t, , , u16, 3, 2) BUILD_TEST (float32x2_t, float32x2_t, , , f32, 1, 0) BUILD_TEST (int32x2_t, int32x2_t, , , s32, 1, 0) BUILD_TEST (uint32x2_t, uint32x2_t, , , u32, 1, 0) -/* { dg-final { scan-assembler-times "ins\\tv0.s\\\[1\\\], v1.s\\\[0\\\]" 3 } } */ +/* { dg-final { scan-assembler-times "zip1\\tv0.2s, v0.2s, v1.2s" 3 } } */ BUILD_TEST (int64x1_t, int64x1_t, , , s64, 0, 0) BUILD_TEST (uint64x1_t, uint64x1_t, , , u64, 0, 0) BUILD_TEST (float64x1_t, float64x1_t, , , f64, 0, 0)