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: 1833622 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=d/4/iyv9; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rm3L66jChz1yhg for ; Thu, 14 Sep 2023 00:51:09 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8D9923858439 for ; Wed, 13 Sep 2023 14:51:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8D9923858439 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694616667; bh=bGgqQTbimB/HA5VqPwataw1rMpLoxWPJQHjkq00CKnc=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=d/4/iyv9SmzFd1WTbINE/5weo5Xr668OKM9Z7q3kPmckTo+UhRlpnequKA0/6Gv8/ WmAtwdw8oJfLCTNKeO0di4Zq1wOiawe60PLuZpiYmY9Zts8cTjT9cMt1+1lqmBBCwf f00TSPrTdiLrc9aFTHFpk2TW5Dv75C1HPcsbQc0U= 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-Google-Smtp-Source: AGHT+IFN0uQS10x8W/gmqgW/U8WgN4sWfjZ3ptR9FOiqEeo7HA9nj1ipmloI5/qrEHO6LCgbbeODlmuExIsKEw+LDgI= 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+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" 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)