From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8952 invoked by alias); 15 Apr 2014 16:17:05 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 8905 invoked by uid 48); 15 Apr 2014 16:17:01 -0000 From: "spatel at rotateright dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/60847] x86 BMI intrinsics not recognized Date: Tue, 15 Apr 2014 16:17:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: spatel at rotateright dot com X-Bugzilla-Status: UNCONFIRMED 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: component Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-04/txt/msg01097.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60847 Sanjay Patel changed: What |Removed |Added ---------------------------------------------------------------------------- Component|target |c --- Comment #3 from Sanjay Patel --- Here's the evidence of the extra leading underscore being the cause of the bug: $ cat bmi.c #include int foo(int a) { return __blsmsk_u32(a); } int foo2(int a) { return __blsr_u32(a); } $ gcc -O1 bmi.c -mbmi -S -o - .text .globl _foo _foo: LFB2449: blsmsk %edi, %eax ret LFE2449: .globl _foo2 _foo2: LFB2450: blsr %edi, %eax ret Thanks to Craig Topper for noticing the underscore problem. Corresponding bug in LLVM where this was first noted is here: http://llvm.org/bugs/show_bug.cgi?id=19431