-
Notifications
You must be signed in to change notification settings - Fork 180
[CIR][CIRGen][Builtin][X86] Lower lzcnt_u16, lzcnt_u32, lzcnt_u64 #1683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f6ba347 to
b460fb3
Compare
|
Hey @RiverDave! Wanted to help out with the X86 builtins so started working on tzcnt. For some odd reason when I test it, Clang is making a helper function (first function) for the intrinsic and then making a call (in the second function) to the helper. Its kinda funny but yeah I was wondering if you've seen that before or could help out. |
Hi, Not an expert here (only started working on cir a couple of days ago), but I believe that's expected. What I understand is that we first lower the test function that makes a call to your intrinsic (we don't really care much about those in test cases). Later based on the intrinsic id parsed it generates a fn definition It might be better to ask in the discord channel to be 100% sure. |
|
Okay, no problem. Thanks! I've asked on the Discord. |
bcardosolopes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks! One minor change needed and good to go
b460fb3 to
0877aa6
Compare


No test cases provided for
lzcnt_u16as presented in the OG codegen equivalent:test/CodeGen/X86/lzcnt-builtins.c.related: #1404