-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
[Attributor] Incorrect optimization of math function when attributor module pass is run #78507
Comments
The way I see it, we currently follow all uses through intrinsics and use the fpclass derived for the result also for the argument. That is wrong, e.g. the fabs result is more constrained then the argument is, I think. I have a fix here: https://github.com/jdoerfert/llvm-project/tree/fpclass_fixes |
I think I just ran into another manifestation of this issue where this is incorrectly adding nofpclass to an incoming function argument based on an unread use context |
The old must-be-executed-context (MBEC) propagation did propagate through calls even if that was not allowed. We now only propagate from call site arguments. If there are calls/intrinsics that allows propagation, we need to add them explicitly. Fixes: llvm#78507
The old must-be-executed-context (MBEC) propagation did propagate through calls even if that was not allowed. We now only propagate from call site arguments. If there are calls/intrinsics that allows propagation, we need to add them explicitly. Fixes: llvm#78507
The old must-be-executed-context (MBEC) propagation did propagate through calls even if that was not allowed. We now only propagate from call site arguments. If there are calls/intrinsics that allows propagation, we need to add them explicitly. Fixes: llvm#78507
The old must-be-executed-context (MBEC) propagation did propagate through calls even if that was not allowed. We now only propagate from call site arguments. If there are calls/intrinsics that allows propagation, we need to add them explicitly. Fixes: llvm#78507
The old use of must-be-executed-context (MBEC) did propagate through calls even if that was not allowed. We now only propagate from call site arguments. If there are calls/intrinsics that allows propagation, we need to add them explicitly. Fixes: #78507 --------- Co-authored-by: Matt Arsenault <arsenm2@gmail.com>
The old use of must-be-executed-context (MBEC) did propagate through calls even if that was not allowed. We now only propagate from call site arguments. If there are calls/intrinsics that allows propagation, we need to add them explicitly. Fixes: llvm#78507 --------- Co-authored-by: Matt Arsenault <arsenm2@gmail.com>
The Attributor module pass currently optimized out this math function incorrectly to always return
NaN
. The reproducer is at https://godbolt.org/z/1P9xTjoab. When the attributor is not run, the function remains correct, when it's run it gets incorrectly removed.The text was updated successfully, but these errors were encountered: