From patchwork Tue Nov 12 14:35:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 1193583 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-513133-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="nG4/Xffx"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="60pPRIpw"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="60pPRIpw"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47C9KW0Vlhz9sP3 for ; Wed, 13 Nov 2019 01:36:14 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=QiT c29BFINvBRmmzpJRbC0ew7NziLxR8gw+e0TvyIon4OhGxQLE2c6IryCRd09QDZ7n ZQZWEvxDirdAR0bzOxzm7Vku54bOenWqk9ovQYqq44Zn1Lsgnq3P8wZlh3V8Y9A4 sjjb9CdG9KCmpWmLctG1t66jJKcJEzfBXYpL1u8o= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:content-type :content-transfer-encoding:mime-version; s=default; bh=k0o4idtxJ 1cpCl0IS49Y0+KpEpY=; b=nG4/XffxiihnMQi2Xot0cc2s8N5c0wW4kDsHhIN1N N7QytKVNAnazvRBw7daxqDjtwZB/j6seQrkImhDSHrx8lew6DJ1FqL2VSBHZcKBE eKep0fZr8rH4EHCUJPrFqHC9rWKRVwXfBJoSgFkyF/3KBbfvcImWF9ioYEfgxPAw 7c= Received: (qmail 82117 invoked by alias); 12 Nov 2019 14:36:07 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 82104 invoked by uid 89); 12 Nov 2019 14:36:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.3 required=5.0 tests=AWL, BAYES_00, FORGED_SPF_HELO, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LOTSOFHASH, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=rbit X-HELO: EUR02-VE1-obe.outbound.protection.outlook.com Received: from mail-eopbgr20079.outbound.protection.outlook.com (HELO EUR02-VE1-obe.outbound.protection.outlook.com) (40.107.2.79) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Nov 2019 14:36:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ds933IAQmewq0fCGy32iKS19lU1hoMNJeSOK2jZf3W8=; b=60pPRIpwKMa/P3ZbE3VeZlbZu0hJnBWY5anxJsKv1ZAy9ooaAgD26qaBXbk6c9ShjG+L/NwZMK+rKXfNZS1Aj2s0tq8hSpKRWOS6WAgW+4VlLC7V/R/w+jTbzw9BcMPqGCKfBPUnPBHXLFB573OVlTsZRHsOeyHhf3NUqBOG8lc= Received: from VI1PR0802CA0026.eurprd08.prod.outlook.com (2603:10a6:800:a9::12) by AM5PR0801MB2036.eurprd08.prod.outlook.com (2603:10a6:203:42::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.22; Tue, 12 Nov 2019 14:36:01 +0000 Received: from DB5EUR03FT051.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::202) by VI1PR0802CA0026.outlook.office365.com (2603:10a6:800:a9::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.22 via Frontend Transport; Tue, 12 Nov 2019 14:36:01 +0000 Authentication-Results: spf=fail (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; gcc.gnu.org; dmarc=none action=none header.from=arm.com; Received-SPF: Fail (protection.outlook.com: domain of arm.com does not designate 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT051.mail.protection.outlook.com (10.152.21.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.21 via Frontend Transport; Tue, 12 Nov 2019 14:36:01 +0000 Received: ("Tessian outbound 0cf06bf5c60e:v33"); Tue, 12 Nov 2019 14:36:01 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 424169b98dc7f71b X-CR-MTA-TID: 64aa7808 Received: from d6dc3797a02a.1 (cr-mta-lb-1.cr-mta-net [104.47.2.53]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id AB0256A2-BEE9-4182-B602-4F46686101C1.1; Tue, 12 Nov 2019 14:35:55 +0000 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01lp2053.outbound.protection.outlook.com [104.47.2.53]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d6dc3797a02a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384); Tue, 12 Nov 2019 14:35:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IEXkS48eZjdUocA/kC+hordw4lehFI+SXmm2Tl4wf7VstOr9cXNbxCR0rkxP+/3tFb+LaHdnBTlix4/FIs68taAh7xTNyA0cgg8SzWTmu8ZAF+ik7yDvRJWbLzyKMOxyoMtQVkjYhQgeF5iFLLQKoQHDndXBhhpcC+3kCgQjU94DIoUgWdWhp4W3Wx6Fii1CTaBS5TNdTQ1FaJcBYxScXxUHPGV3gd0gkSC0+qLhqvZkgMmzi1O5K+heD2lI39OPZO6TeKFnCI6JQSt+iFdvA1eMVjXfRWs6no1BqWGJk+top3IkW5KKH3D+USdaeGvHPssNPm/OQn47INenZArdLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ds933IAQmewq0fCGy32iKS19lU1hoMNJeSOK2jZf3W8=; b=IPACmR3lJnHaOV/fzA89W4umKQj+YX7f9wyBBBk3sRGEgdG+1c+gf06+UVQFG6hiFGXdu5/TfW9n84QyRUp2FZknV4BP/ZDiCAlwXAOq99CM7cewCJCRHb63PL2cmOULj6oyXazTiTetSBui8x0G9qIJ31O6DKP9AboNlRtcyLDJDZPlqvwyq9rpQXw8B2Ljq34F4vvoXsu7lZnVxGbgbj7jiTnZnBjEso7FvZPV3/g0WnTzk0HM6wN9nTMgmw6N82JeNI60psytMKjkuYbLdvwJyJX6AD+/74olAEELpAldBaDH6oGCRgPjvk4tst5gapqFGHA4BrvGShwEj5bMHA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ds933IAQmewq0fCGy32iKS19lU1hoMNJeSOK2jZf3W8=; b=60pPRIpwKMa/P3ZbE3VeZlbZu0hJnBWY5anxJsKv1ZAy9ooaAgD26qaBXbk6c9ShjG+L/NwZMK+rKXfNZS1Aj2s0tq8hSpKRWOS6WAgW+4VlLC7V/R/w+jTbzw9BcMPqGCKfBPUnPBHXLFB573OVlTsZRHsOeyHhf3NUqBOG8lc= Received: from VI1PR0801MB2127.eurprd08.prod.outlook.com (10.168.62.22) by VI1PR0801MB1710.eurprd08.prod.outlook.com (10.168.63.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.25; Tue, 12 Nov 2019 14:35:54 +0000 Received: from VI1PR0801MB2127.eurprd08.prod.outlook.com ([fe80::f46f:30ca:e545:36d4]) by VI1PR0801MB2127.eurprd08.prod.outlook.com ([fe80::f46f:30ca:e545:36d4%9]) with mapi id 15.20.2430.027; Tue, 12 Nov 2019 14:35:54 +0000 From: Wilco Dijkstra To: GCC Patches CC: Richard Biener Subject: [PATCH] PR90838: Support ctz idioms Date: Tue, 12 Nov 2019 14:35:54 +0000 Message-ID: Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:389;OLM:389; X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(396003)(346002)(376002)(366004)(39860400002)(136003)(54534003)(199004)(189003)(4001150100001)(26005)(6506007)(186003)(99286004)(5660300002)(102836004)(25786009)(476003)(64756008)(66446008)(66476007)(66556008)(2906002)(86362001)(478600001)(486006)(316002)(6116002)(305945005)(3846002)(71190400001)(66066001)(7736002)(8676002)(81156014)(6436002)(81166006)(66946007)(8936002)(74316002)(9686003)(55016002)(52536014)(6916009)(4326008)(14454004)(33656002)(7696005)(256004)(91956017)(76116006)(71200400001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0801MB1710; H:VI1PR0801MB2127.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: CXnvjUFYgQljE0OSR9JtvJJjJfvr8tSCqri5s2ogfeK8DhTLF6bVY1tawOA79FtyFiSkcix7G0QljASETZTIQPgtxRGXtM+p167HeoAszSfJcygHOroBxN6p+afVuHO4enJlh357rqbBojaKgC9kF5OirTvs0ZQ3Cdr+n+Uzdsn3dfNJp2ptSBpVgvL4eIPqLt4LPykQwValKaZ/aT/z279vhX2V8KvUMmFu7jqXW8fuAF0NdYtP/m4WqH8j/+d4nAS5AhSqFgwZtb/hQiFbCTSK74VjH3LGmbCKiF31u4XYVzl38YJOH7oJdu0ZnykyDOtwMuvcWNDF8LtG5GSPLhXhZemoOpQvQAALZEmuQla+VjypHDcGUlSTdh62FQwavkfFpNqPdnKU3ealT2h2JaULcENHBGjhNs3FLDxsMHCEfVdAUY4mCUBS5t6Qmo9u x-ms-exchange-transport-forked: True MIME-Version: 1.0 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT051.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 728b3c9a-d5f4-4bad-aefd-08d7677d9fa6 Hi, Support common idioms for count trailing zeroes using an array lookup. The canonical form is array[((x & -x) * C) >> SHIFT] where C is a magic constant which when multiplied by a power of 2 contains a unique value in the top 5 or 6 bits. This is then indexed into a table which maps it to the number of trailing zeroes. When the table is valid, we emit a sequence using the target defined value for ctz (0): int ctz1 (unsigned x) { static const char table[32] = { 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9 }; return table[((unsigned)((x & -x) * 0x077CB531U)) >> 27]; } Is optimized to: rbit w0, w0 clz w0, w0 and w0, w0, 31 ret Bootstrapped on AArch64. OK for commit? ChangeLog: 2019-11-12 Wilco Dijkstra PR tree-optimization/90838 * generic-match-head.c (optimize_count_trailing_zeroes): Add stub function. * gimple-match-head.c (gimple_simplify): Add support for ARRAY_REF. (optimize_count_trailing_zeroes): Add new function. * match.pd: Add matching for ctz idioms. * testsuite/gcc.target/aarch64/pr90838.c: New test. diff --git a/gcc/generic-match-head.c b/gcc/generic-match-head.c index fdc603977fc5b03a843944f75ce262f5d2256308..5a38bd233585225d60f0159c9042a16d9fdc9d80 100644 --- a/gcc/generic-match-head.c +++ b/gcc/generic-match-head.c @@ -88,3 +88,10 @@ optimize_successive_divisions_p (tree, tree) { return false; } + +static bool +optimize_count_trailing_zeroes (tree type, tree array_ref, tree input, + tree mulc, tree shift, tree &zero_val) +{ + return false; +} diff --git a/gcc/gimple-match-head.c b/gcc/gimple-match-head.c index 53278168a59f5ac10ce6760f04fd42589a0792e7..2d3b305f8ea54e4ca31c64994af30b34bb7eff09 100644 --- a/gcc/gimple-match-head.c +++ b/gcc/gimple-match-head.c @@ -909,6 +909,24 @@ gimple_simplify (gimple *stmt, gimple_match_op *res_op, gimple_seq *seq, res_op->set_op (TREE_CODE (op0), type, valueized); return true; } + else if (code == ARRAY_REF) + { + tree rhs1 = gimple_assign_rhs1 (stmt); + tree op1 = TREE_OPERAND (rhs1, 1); + tree op2 = TREE_OPERAND (rhs1, 2); + tree op3 = TREE_OPERAND (rhs1, 3); + tree op0 = TREE_OPERAND (rhs1, 0); + bool valueized = false; + + op0 = do_valueize (op0, top_valueize, valueized); + op1 = do_valueize (op1, top_valueize, valueized); + + if (op2 && op3) + res_op->set_op (code, type, op0, op1, op2, op3); + else + res_op->set_op (code, type, op0, op1); + return gimple_resimplify4 (seq, res_op, valueize) || valueized; + } break; case GIMPLE_UNARY_RHS: { @@ -1222,3 +1240,57 @@ optimize_successive_divisions_p (tree divisor, tree inner_div) } return true; } + +/* Recognize count trailing zeroes idiom. + The canonical form is array[((x & -x) * C) >> SHIFT] where C is a magic + constant which when multiplied by a power of 2 contains a unique value + in the top 5 or 6 bits. This is then indexed into a table which maps it + to the number of trailing zeroes. Array[0] is returned so the caller can + emit an appropriate sequence depending on whether ctz (0) is defined on + the target. */ +static bool +optimize_count_trailing_zeroes (tree type, tree array, tree x, tree mulc, + tree tshift, tree &zero_val) +{ + gcc_assert (TREE_CODE (mulc) == INTEGER_CST); + gcc_assert (TREE_CODE (tshift) == INTEGER_CST); + + tree input_type = TREE_TYPE (x); + + if (!direct_internal_fn_supported_p (IFN_CTZ, input_type, OPTIMIZE_FOR_BOTH)) + return false; + + unsigned HOST_WIDE_INT val = tree_to_uhwi (mulc); + unsigned shiftval = tree_to_uhwi (tshift); + unsigned input_bits = tree_to_shwi (TYPE_SIZE (input_type)); + + /* Check the array is not wider than integer type and the input is a 32-bit + or 64-bit type. The shift should extract the top 5..7 bits. */ + if (TYPE_PRECISION (type) > 32) + return false; + if (input_bits != 32 && input_bits != 64) + return false; + if (shiftval < input_bits - 7 || shiftval > input_bits - 5) + return false; + + tree t = build4 (ARRAY_REF, type, array, size_int (0), NULL_TREE, NULL_TREE); + t = fold_const_aggregate_ref (t); + if (t == NULL) + return false; + + zero_val = build_int_cst (integer_type_node, tree_to_shwi (t)); + + for (unsigned i = 0; i < input_bits; i++, val <<= 1) + { + if (input_bits == 32) + val &= 0xffffffff; + t = build4 (ARRAY_REF, type, array, size_int ((int)(val >> shiftval)), + NULL_TREE, NULL_TREE); + t = fold_const_aggregate_ref (t); + if (t == NULL || tree_to_shwi (t) != i) + return false; + } + + return true; +} + diff --git a/gcc/match.pd b/gcc/match.pd index 6edf54b80012d87dbe7330f5ee638cdba2f9c099..bbe935e1e2af35e8e953a776eb3ecfb83414b047 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -6060,3 +6060,33 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (simplify (vec_perm vec_same_elem_p@0 @0 @1) @0) + +/* Recognize count trailing zeroes idiom. + The canonical form is array[((x & -x) * C) >> SHIFT] where C is a magic + constant which when multiplied by a power of 2 contains a unique value + in the top 5 or 6 bits. This is then indexed into a table which maps it + to the number of trailing zeroes. If valid, emit an optimal sequence + depending on the result for zero. +*/ +(simplify + (ARRAY_REF @0 (rshift (mult (bit_and (negate @1) @1) INTEGER_CST@2) + INTEGER_CST@3) @4 @5) + (with + { tree zero_val; + HOST_WIDE_INT val; + HOST_WIDE_INT type_size = tree_to_shwi (TYPE_SIZE (TREE_TYPE (@1))); + bool zero_ok = CTZ_DEFINED_VALUE_AT_ZERO (TYPE_MODE (TREE_TYPE (@1)), val); + } + (if (optimize_count_trailing_zeroes (type, @0, @1, @2, @3, zero_val)) + (switch + (if (zero_ok && tree_to_shwi (zero_val) == val) + (convert (BUILT_IN_CTZ:integer_type_node @1))) + + /* Emit ctz (x) & 31 if ctz (0) is 32 but we need to return 0. */ + (if (zero_ok && val == type_size && integer_zerop (zero_val)) + (convert (bit_and (BUILT_IN_CTZ:integer_type_node @1) + { build_int_cst (integer_type_node, type_size - 1); }))) + + /* Emit (x ? ctz (x) : zero_val). */ + (if (true) + (convert (cond @1 (BUILT_IN_CTZ:integer_type_node @1) { zero_val; } ))))))) diff --git a/gcc/testsuite/gcc.target/aarch64/pr90838.c b/gcc/testsuite/gcc.target/aarch64/pr90838.c new file mode 100644 index 0000000000000000000000000000000000000000..bff3144c0d1b3984016e5a404e986eae785c73ed --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/pr90838.c @@ -0,0 +1,64 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +int ctz1 (unsigned x) +{ + static const char table[32] = + { + 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, + 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9 + }; + + return table[((unsigned)((x & -x) * 0x077CB531U)) >> 27]; +} + +int ctz2 (unsigned x) +{ + const int u = 0; + static short table[64] = + { + 32, 0, 1,12, 2, 6, u,13, 3, u, 7, u, u, u, u,14, + 10, 4, u, u, 8, u, u,25, u, u, u, u, u,21,27,15, + 31,11, 5, u, u, u, u, u, 9, u, u,24, u, u,20,26, + 30, u, u, u, u,23, u,19,29, u,22,18,28,17,16, u + }; + + x = (x & -x) * 0x0450FBAF; + return table[x >> 26]; +} + +int ctz3 (unsigned x) +{ + static int table[32] = + { + 0, 1, 2,24, 3,19, 6,25, 22, 4,20,10,16, 7,12,26, + 31,23,18, 5,21, 9,15,11,30,17, 8,14,29,13,28,27 + }; + + if (x == 0) return 32; + x = (x & -x) * 0x04D7651F; + return table[x >> 27]; +} + +static const unsigned long long magic = 0x03f08c5392f756cdULL; + +static const char table[64] = { + 0, 1, 12, 2, 13, 22, 17, 3, + 14, 33, 23, 36, 18, 58, 28, 4, + 62, 15, 34, 26, 24, 48, 50, 37, + 19, 55, 59, 52, 29, 44, 39, 5, + 63, 11, 21, 16, 32, 35, 57, 27, + 61, 25, 47, 49, 54, 51, 43, 38, + 10, 20, 31, 56, 60, 46, 53, 42, + 9, 30, 45, 41, 8, 40, 7, 6, +}; + +int ctz4 (unsigned long x) +{ + unsigned long lsb = x & -x; + return table[(lsb * magic) >> 58]; +} + +/* { dg-final { scan-assembler-times "clz\t" 4 } } */ +/* { dg-final { scan-assembler-times "and\t" 2 } } */ +/* { dg-final { scan-assembler-not "cmp\t.*0" } } */