From patchwork Thu Jul 25 02:14:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 1964583 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=hMRwCdYD; 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 4WTvcf1HKRz1ybY for ; Thu, 25 Jul 2024 12:15:46 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7157C385840C for ; Thu, 25 Jul 2024 02:15:44 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by sourceware.org (Postfix) with ESMTPS id 9ED203858C3A for ; Thu, 25 Jul 2024 02:15:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9ED203858C3A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=quicinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9ED203858C3A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1721873711; cv=none; b=n83aqDcsSpCVQCYfq/OxggO89qxKtgzRt41KMqmIMpx92myJAlDeTzZzNEAK5l0rQtVJqu0uUtC2fExcMU8w2TYOihfdwpC4gx45/oHyqs4E/5GrgsJ8juYODpe7yjaQL5KYJfE+ml3TObGqeVDd6uif4GwLPLVevJv+BpcRjFM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1721873711; c=relaxed/simple; bh=FO9MnFsPfKbDAkSaCmPpAXcMOFPOhOu4L+SEC+VAj3w=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=k0Bs2kfNMvVZCzkcu/vnhoE6Lm/3tAHsp52KzaxSA1GtJX8Ka2beahxUAWWZJ6MI5/IaUrY0JxumeUQR3E2H9bhI9pl0x//RBmog+RzIPxr02/1wIhhsHwrVmDDW/oGU4tbm23PQDmCKXhlUSNvC6lZKBJezJToIR+W4xls/Igc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 46OJeUHS015382 for ; Thu, 25 Jul 2024 02:15:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 1Tii2kkm1BcCP0cAdjFXjhUXFUn6NvcM1VfQYNerxWk=; b=hMRwCdYD41YbgF98 xQ3Ji1+oWy9MnCFkIZ0VonPiBhhl+mo47tlkXWeDE/PtoE8tiAbWAIbRkdZ7FSzK 08fhw352xtDcAbd+rbtrRS4/6SCOdGZgUVi9Yy/nnPZ1n4ZLZa5tsXpQbvietDpZ kq3rkl2Bz2b2SjSVfO7h8rB3DLPALSDfWqFjTKMAOM8J0LUSHZdbRojPQPOPTOzS La6/0c7m+/T+1w8MxnNypXL8sM55m2vy073/dePGrURewbHTJ6iY8fJVoVLfWLN2 G4a0mN7caa1PbKyFF53SpYSG37YIBq57e8zUDr0EsoiNAtRRdmnXBZ60j6H1EYQe eslDjw== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 40jxxbj0yk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 25 Jul 2024 02:15:07 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA05.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTPS id 46P2F7uv031817 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 25 Jul 2024 02:15:07 GMT Received: from hu-apinski-lv.qualcomm.com (10.49.16.6) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 24 Jul 2024 19:15:06 -0700 From: Andrew Pinski To: CC: Andrew Pinski Subject: [PATCH 4/5] MATCH: Create BIT_ANDN and BIT_IORN from matching Date: Wed, 24 Jul 2024 19:14:48 -0700 Message-ID: <20240725021449.3650437-4-quic_apinski@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240725021449.3650437-1-quic_apinski@quicinc.com> References: <20240725021449.3650437-1-quic_apinski@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: fdy7Q_q4hPpW08eWzgkeCOy5caEvyrKh X-Proofpoint-GUID: fdy7Q_q4hPpW08eWzgkeCOy5caEvyrKh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-07-25_02,2024-07-24_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 malwarescore=0 suspectscore=0 mlxscore=0 bulkscore=0 clxscore=1015 mlxlogscore=999 lowpriorityscore=0 adultscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2407110000 definitions=main-2407250012 X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, SPF_NONE, 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: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org To better create rtl directly from gimple, we can use these already internal functions from the gimple. That is simplify `a & ~b` into BIT_ANDN. Likewise `a | ~b` into BIT_IORN. We only want to do this late after vectorization as some targets (e.g. aarch64 SVE) has BIT_IORN on scalars but not on some vector modes; even though the vectorizer could expand it back. Note a few testcases need to be changed to not look into optimized dump and catch them earlier. The modified testcases could catch BIT_ANDN and BIT_IORN so move the testing to forwprop2 before simplification happens. Built and tested on aarch64-linux-gnu with no regressions. PR target/115086 gcc/ChangeLog: * match.pd (`a & ~b`, `a | ~b`): New pattern. (BIT_ANDN/BIT_IORN with CST): New pattern. gcc/testsuite/ChangeLog: * gcc.target/aarch64/bic-cst-1.c: New test. * gcc.target/aarch64/bic_simd-1.c: New test. * gcc.dg/tree-ssa/bitops-1.c: Move testing from optimized to forwprop2. * gcc.dg/tree-ssa/bitops-6.c: Likewise. * gcc.dg/tree-ssa/cmpbit-4.c: Likewise. * gcc.dg/tree-ssa/pr110637-2.c: Likewise. * gcc.dg/tree-ssa/pr94880.c: Likewise. * gcc.dg/tree-ssa/pr96671-1.c: Likewise. Signed-off-by: Andrew Pinski --- gcc/match.pd | 17 ++++++++++ gcc/testsuite/gcc.dg/tree-ssa/bitops-1.c | 10 +++--- gcc/testsuite/gcc.dg/tree-ssa/bitops-6.c | 12 +++---- gcc/testsuite/gcc.dg/tree-ssa/bitops-8.c | 8 ++--- gcc/testsuite/gcc.dg/tree-ssa/cmpbit-4.c | 12 +++---- gcc/testsuite/gcc.dg/tree-ssa/pr110637-2.c | 8 ++--- gcc/testsuite/gcc.dg/tree-ssa/pr94880.c | 6 ++-- gcc/testsuite/gcc.dg/tree-ssa/pr96671-1.c | 8 ++--- gcc/testsuite/gcc.target/aarch64/bic-cst-1.c | 31 ++++++++++++++++++ gcc/testsuite/gcc.target/aarch64/bic_simd-1.c | 32 +++++++++++++++++++ 10 files changed, 112 insertions(+), 32 deletions(-) create mode 100644 gcc/testsuite/gcc.target/aarch64/bic-cst-1.c create mode 100644 gcc/testsuite/gcc.target/aarch64/bic_simd-1.c diff --git a/gcc/match.pd b/gcc/match.pd index cf359b0ec0f..56f631dfeec 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -9979,6 +9979,23 @@ and, (cond_op:s @1 @2 @3 @4 @5) @5) (cond_op (bit_and @1 @0) @2 @3 @4 @5))) +#if GIMPLE +/* Create bit_andc and bit_iorc internal functions. */ +(for bitop (bit_and bit_ior) + bitopc (IFN_BIT_ANDN IFN_BIT_IORN) + (simplify + (bitop:c (bit_not:s @0) @1) + (if (canonicalize_math_after_vectorization_p () + && direct_internal_fn_supported_p (as_internal_fn (bitopc), + type, OPTIMIZE_FOR_BOTH)) + (bitopc @1 @0))) + /* If the second operand is a constant, then reduce it to a & ~cst if + the not simplifies. */ + (simplify + (bitopc @0 CONSTANT_CLASS_P@1) + (bitop (bit_not! @1) @0))) +#endif + /* For pointers @0 and @2 and nonnegative constant offset @1, look for expressions like: diff --git a/gcc/testsuite/gcc.dg/tree-ssa/bitops-1.c b/gcc/testsuite/gcc.dg/tree-ssa/bitops-1.c index cf2823deb62..3a394b1f188 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/bitops-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/bitops-1.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-O -fdump-tree-optimized-raw" } */ +/* { dg-options "-O -fdump-tree-forwprop2-raw" } */ #define DECLS(n,VOL) \ __attribute__((noinline,noclone)) \ @@ -66,7 +66,7 @@ int main(){ } } -/* { dg-final { scan-tree-dump-times "bit_not_expr" 12 "optimized"} } */ -/* { dg-final { scan-tree-dump-times "bit_and_expr" 9 "optimized"} } */ -/* { dg-final { scan-tree-dump-times "bit_ior_expr" 10 "optimized"} } */ -/* { dg-final { scan-tree-dump-times "bit_xor_expr" 9 "optimized"} } */ +/* { dg-final { scan-tree-dump-times "bit_not_expr, " 12 "forwprop2"} } */ +/* { dg-final { scan-tree-dump-times "bit_and_expr, " 9 "forwprop2"} } */ +/* { dg-final { scan-tree-dump-times "bit_ior_expr, " 10 "forwprop2"} } */ +/* { dg-final { scan-tree-dump-times "bit_xor_expr, " 9 "forwprop2"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/bitops-6.c b/gcc/testsuite/gcc.dg/tree-ssa/bitops-6.c index e6ab2fd6c71..e08132e2ab5 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/bitops-6.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/bitops-6.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-optimized-raw" } */ +/* { dg-options "-O2 -fdump-tree-forwprop2-raw" } */ /* PR tree-optimization/111282 */ @@ -25,9 +25,9 @@ int fcmp(int x, int y) return a & (b ^ !a); // (x == 2) & (y == 1) } -/* { dg-final { scan-tree-dump-not "bit_xor_expr, " "optimized" } } */ -/* { dg-final { scan-tree-dump-times "bit_and_expr, " 4 "optimized" } } */ -/* { dg-final { scan-tree-dump-times "bit_not_expr, " 1 "optimized" } } */ -/* { dg-final { scan-tree-dump-not "ne_expr, " "optimized" } } */ -/* { dg-final { scan-tree-dump-times "eq_expr, " 2 "optimized" } } */ +/* { dg-final { scan-tree-dump-not "bit_xor_expr, " "forwprop2" } } */ +/* { dg-final { scan-tree-dump-times "bit_and_expr, " 4 "forwprop2" } } */ +/* { dg-final { scan-tree-dump-times "bit_not_expr, " 1 "forwprop2" } } */ +/* { dg-final { scan-tree-dump-not "ne_expr, " "forwprop2" } } */ +/* { dg-final { scan-tree-dump-times "eq_expr, " 2 "forwprop2" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/bitops-8.c b/gcc/testsuite/gcc.dg/tree-ssa/bitops-8.c index 40f756e4455..52c2f394222 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/bitops-8.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/bitops-8.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-optimized-raw" } */ +/* { dg-options "-O2 -fdump-tree-forwprop2-raw" } */ /* PR tree-optimization/115224 */ int f1(int a, int b) @@ -9,7 +9,7 @@ int f1(int a, int b) return c | (a ^ b); // ~((a ^ 1) & b) or (a ^ -2) | ~b } -/* { dg-final { scan-tree-dump-times "bit_xor_expr, " 1 "optimized" } } */ -/* { dg-final { scan-tree-dump-times "bit_ior_expr, " 1 "optimized" } } */ -/* { dg-final { scan-tree-dump-times "bit_not_expr, " 1 "optimized" } } */ +/* { dg-final { scan-tree-dump-times "bit_xor_expr, " 1 "forwprop2" } } */ +/* { dg-final { scan-tree-dump-times "bit_ior_expr, " 1 "forwprop2" } } */ +/* { dg-final { scan-tree-dump-times "bit_not_expr, " 1 "forwprop2" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/cmpbit-4.c b/gcc/testsuite/gcc.dg/tree-ssa/cmpbit-4.c index cdba5d623af..627dcc57cc7 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/cmpbit-4.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/cmpbit-4.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-optimized-raw" } */ +/* { dg-options "-O2 -fdump-tree-forwprop2-raw" } */ int g(int x, int y) { @@ -40,8 +40,8 @@ _Bool gbi0(int a, int b) } /* All of these should be optimized to `x & y` or `~x & y` */ -/* { dg-final { scan-tree-dump-times "le_expr, " 3 "optimized" } } */ -/* { dg-final { scan-tree-dump-times "gt_expr, " 1 "optimized" } } */ -/* { dg-final { scan-tree-dump-not "bit_xor_expr, " "optimized" } } */ -/* { dg-final { scan-tree-dump-times "bit_and_expr, " 6 "optimized" } } */ -/* { dg-final { scan-tree-dump-times "bit_not_expr, " 2 "optimized" } } */ +/* { dg-final { scan-tree-dump-times "le_expr, " 3 "forwprop2" } } */ +/* { dg-final { scan-tree-dump-times "gt_expr, " 1 "forwprop2" } } */ +/* { dg-final { scan-tree-dump-not "bit_xor_expr, " "forwprop2" } } */ +/* { dg-final { scan-tree-dump-times "bit_and_expr, " 6 "forwprop2" } } */ +/* { dg-final { scan-tree-dump-times "bit_not_expr, " 2 "forwprop2" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr110637-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr110637-2.c index f1c5b90353a..81d6a092508 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr110637-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr110637-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -fdump-tree-optimized" } */ +/* { dg-options "-O1 -fdump-tree-forwprop2" } */ int f(int a) { int b = a & 1; @@ -8,6 +8,6 @@ int f(int a) } /* This should be optimized to just return `(a&1) ^ 1` or `(~a) & 1`. */ -/* { dg-final { scan-tree-dump-not " == " "optimized"} } */ -/* { dg-final { scan-tree-dump-times "~a" 1 "optimized"} } */ -/* { dg-final { scan-tree-dump-times " & 1" 1 "optimized"} } */ +/* { dg-final { scan-tree-dump-not " == " "forwprop2"} } */ +/* { dg-final { scan-tree-dump-times "~a" 1 "forwprop2"} } */ +/* { dg-final { scan-tree-dump-times " & 1" 1 "forwprop2"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr94880.c b/gcc/testsuite/gcc.dg/tree-ssa/pr94880.c index f7216618147..72a14b915a5 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr94880.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr94880.c @@ -1,8 +1,8 @@ /* PR tree-optimization/94786 */ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-optimized" } */ -/* { dg-final { scan-tree-dump-times "= ~\[xy\]_" 4 "optimized" } } */ -/* { dg-final { scan-tree-dump-times " & \[xy\]_" 4 "optimized" } } */ +/* { dg-options "-O2 -fdump-tree-forwprop2" } */ +/* { dg-final { scan-tree-dump-times "= ~\[xy\]_" 4 "forwprop2" } } */ +/* { dg-final { scan-tree-dump-times " & \[xy\]_" 4 "forwprop2" } } */ unsigned foo_u(unsigned x, unsigned y) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr96671-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr96671-1.c index 42c5b27b53f..cf977b55cc2 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr96671-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr96671-1.c @@ -1,9 +1,9 @@ /* PR tree-optimization/96671 */ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-optimized" } */ -/* { dg-final { scan-tree-dump-times " \\^ " 6 "optimized" } } */ -/* { dg-final { scan-tree-dump-times " ~" 6 "optimized" } } */ -/* { dg-final { scan-tree-dump-times " & " 6 "optimized" } } */ +/* { dg-options "-O2 -fdump-tree-forwprop2" } */ +/* { dg-final { scan-tree-dump-times " \\^ " 6 "forwprop2" } } */ +/* { dg-final { scan-tree-dump-times " ~" 6 "forwprop2" } } */ +/* { dg-final { scan-tree-dump-times " & " 6 "forwprop2" } } */ int foo (int a, int b, int c) diff --git a/gcc/testsuite/gcc.target/aarch64/bic-cst-1.c b/gcc/testsuite/gcc.target/aarch64/bic-cst-1.c new file mode 100644 index 00000000000..1c25de3ba84 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/bic-cst-1.c @@ -0,0 +1,31 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-O2 -fdump-tree-optimized" } */ +/* { dg-final { check-function-bodies "**" "" "" { target { le } } } } */ + +/** +**bar1: +** mov w([0-9]+), 4 +** bic w0, w\1, w1 +** ret +*/ +int bar1(int a, int c) +{ + int b = 4 & ~c; + return b; +} + +/** +**foo1: +** mov w([0-9]+), 4 +** orn w0, w\1, w1 +** ret +*/ +int foo1(int a, int c) +{ + int b = 4 | ~c; + return b; +} + +/* { dg-final { scan-tree-dump ".BIT_ANDN " "optimized" } } */ +/* { dg-final { scan-tree-dump ".BIT_IORN " "optimized" } } */ + diff --git a/gcc/testsuite/gcc.target/aarch64/bic_simd-1.c b/gcc/testsuite/gcc.target/aarch64/bic_simd-1.c new file mode 100644 index 00000000000..e2a69272456 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/bic_simd-1.c @@ -0,0 +1,32 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-O2 -fdump-tree-optimized" } */ +/* { dg-final { check-function-bodies "**" "" "" { target { le } } } } */ + +/** +**bar1: +** movi v([0-9]+).2s, 0x4 +** bic v0.8b, v\1.8b, v1.8b +** ret +*/ +#define vect8 __attribute__((vector_size(8))) +vect8 int bar1(vect8 int a, vect8 int c) +{ + vect8 int b = 4 & ~c; + return b; +} + +/** +**foo1: +** movi v([0-9]+).2s, 0x4 +** orn v0.8b, v\1.8b, v1.8b +** ret +*/ +vect8 int foo1(vect8 int a, vect8 int c) +{ + vect8 int b = 4 | ~c; + return b; +} + +/* { dg-final { scan-tree-dump ".BIT_ANDN " "optimized" } } */ +/* { dg-final { scan-tree-dump ".BIT_IORN " "optimized" } } */ +