These are all implemented by icc as well.
I made bit_scan_forward/reverse forward to the bsfd/bsrq since we also have
bsfq/bsrq.
Note, when lzcnt is enabled the bsr intrinsics generates lzcnt+xor instead of bsr.
Paths
| Differential D59682
[X86] Add BSR/BSF/BSWAP intrinsics to ia32intrin.h to match gcc. ClosedPublic Authored by craig.topper on Mar 22 2019, 12:12 AM.
Details Summary These are all implemented by icc as well. I made bit_scan_forward/reverse forward to the bsfd/bsrq since we also have Note, when lzcnt is enabled the bsr intrinsics generates lzcnt+xor instead of bsr.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Mar 23 2019, 4:23 PM Closed by commit rC356848: [X86] Add BSR/BSF/BSWAP intrinsics to ia32intrin.h to match gcc. (authored by ctopper). · Explain WhyMar 23 2019, 5:56 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 192017 lib/Headers/ia32intrin.h
lib/Headers/immintrin.h
test/CodeGen/bitscan-builtins.c
test/CodeGen/x86-bswap.c
|
Ideally we'd have doxygen comments.