This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/60847] x86 BMI intrinsics not recognized
- From: "spatel at rotateright dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 15 Apr 2014 16:17:01 +0000
- Subject: [Bug c/60847] x86 BMI intrinsics not recognized
- Auto-submitted: auto-generated
- References: <bug-60847-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60847
Sanjay Patel <spatel at rotateright dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|target |c
--- Comment #3 from Sanjay Patel <spatel at rotateright dot com> ---
Here's the evidence of the extra leading underscore being the cause of the bug:
$ cat bmi.c
#include <x86intrin.h>
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