-
Notifications
You must be signed in to change notification settings - Fork 13.5k
InstCombine should fold ldexp(x, zext(i1 y)) to fmul x, (select y, 2.0, 1.0) #92538
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
Comments
Hi! This issue may be a good introductory issue for people new to working on LLVM. If you would like to work on this issue, your first steps are:
If you have any further questions about this issue, don't hesitate to ask via a comment in the thread below. |
@llvm/issue-subscribers-good-first-issue Author: Matt Arsenault (arsenm)
```
define float @src(float %x, i1 %bool) {
%zext = zext i1 %bool to i32
%ldexp = call float @llvm.ldexp.f32.i32(float %x, i32 %zext)
ret float %ldexp
}
define float @tgt(float %x, i1 %bool) {
|
I think |
tgt3 should be using -0 as the fadd identity value, not +0 |
This seems to require an additional register |
Would it be alright if I assigned this issue to myself? |
Thanks @arsenm! Looking forward to taking a crack at it. I've never worked with instcombine yet, so this is pretty exciting. |
Just wanted to give you folks an update - I've written a bit of code and have some to push soon, but midterms are coming up so I might not be super responsive. If someone else wants this issue really badly / already has code for it, I'm happy to hand it over. Not that I don't want to do it myself, just don't want to hog an issue. |
I would be happy to keep working on it. |
Totally happy to pass the issue over to you if you'd like. |
Uh oh!
There was an error while loading. Please reload this page.
I noticed the pattern while looking at builtin math library code
The text was updated successfully, but these errors were encountered: