-
Notifications
You must be signed in to change notification settings - Fork 13.6k
missed fold, fcmp ogt (x - y), 0 => fcmp ogt x, y #85245
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: Zhengyang Liu (zhengyang92)
https://alive2.llvm.org/ce/z/azHAHq
https://godbolt.org/z/M8WbdYE8x
define i1 @<!-- -->src(float %0, float %1) {
%t2 = fsub float %0, %1
%t3 = fcmp ogt float %t2, 0.000000e+00
ret i1 %t3
}
define i1 @<!-- -->tgt(float %0, float %1) {
%olt = fcmp ogt float %0, %1
ret i1 %olt
} @jayfoad @regehr |
@dtcxzyw, I would like to take this one. |
This only works for floating point formats that have IEEE-like denormals (does LLVM currently support any formats that do not have denormals?), and when denormals are not being flushed to zero. Otherwise you can have two different values |
As a follow up we could do the same kind of thing for plus, e.g. |
Resolve #85245 Alive2: https://alive2.llvm.org/ce/z/F4rDwK --------- Co-authored-by: Matt Arsenault <[email protected]> Co-authored-by: Jay Foad <[email protected]>
…#85506) Resolve llvm#85245 Alive2: https://alive2.llvm.org/ce/z/F4rDwK --------- Co-authored-by: Matt Arsenault <[email protected]> Co-authored-by: Jay Foad <[email protected]>
https://alive2.llvm.org/ce/z/azHAHq
https://godbolt.org/z/M8WbdYE8x
@jayfoad @regehr
The text was updated successfully, but these errors were encountered: