From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A845C3858C2D; Mon, 7 Aug 2023 01:52:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A845C3858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691373120; bh=3NfLlhbw8uyrz9hrdEnyAvBCYC2F6HSwVwXgHrLmnGU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MM9j998r7Fy8LRe0yePvwaOx8Z0+1sd7nVE/IxSiAK4l43M/7COC5YZMj7u1NI7ML 0iZwILYkK7JQOaZ9VWuQQT3MuLdjbLuFm/mFUoXk824QkXel0DuSxisEdRBOcjBndC dGKjKNXr8JDsdJBTBKMzBcdiCdyNlD0VOPRG0GJ8= From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110921] Relax _tzcnt_u32 support x86, all x86 arch support for this instrunction Date: Mon, 07 Aug 2023 01:52:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: crazylht at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110921 --- Comment #5 from Hongtao.liu --- Maybe source code can be changed as int f(int a, int b) { #ifdef __BMI__ return _tzcnt_u32 (a); #else return _bit_scan_forward (a); #endif } But looks like clang/MSVC doesn't support _bit_scan_forward, should be a bug for them since it's in the intrinsics guide.=