-
Notifications
You must be signed in to change notification settings - Fork 13.4k
investigate how to use llvm.is.fpclass
and replace int_dx_isinf
with it
#87777
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
Labels
backend:DirectX
question
A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Comments
@farzonl - is this still needed or are there other issues tracking this? |
@tex3d mentioned that the isinf and isnan ops are intended to not be removed when using fast math. |
Icohedron
added a commit
that referenced
this issue
May 8, 2025
…assTest and the `IsNaN`, `IsInf`, `IsFinite`, `IsNormal` DXIL ops (#138048) Fixes #137209 This PR: - Adds a case to `expandIntrinsic()` in `DXILIntrinsicExpansion.cpp` to expand the `Intrinsic::is_fpclass` in the case of `FPClassTest::fcNegZero` - Defines the `IsNaN`, `IsFinite`, `IsNormal` DXIL ops in `DXIL.td` - Adds a case to `lowerIntrinsics()` in `DXILOpLowering.cpp` to handle the lowering of `Intrinsic::is_fpclass` to the DXIL ops `IsNaN`, `IsInf`, `IsFinite`, `IsNormal` when the FPClassTest is `fcNan`, `fcInf`, `fcFinite`, and `fcNormal` respectively - Creates a test `llvm/test/CodeGen/DirectX/is_fpclass.ll` to exercise the intrinsic expansion and DXIL op lowering of `Intrinsic::is_fpclass` ~~A separate PR will be made to remove the now-redundant `dx_isinf` intrinsic to address #87777.~~ A proper implementation for the lowering of the `llvm.is.fpclass` intrinsic to handle all possible combinations of FPClassTest can be implemented in a separate PR. This PR's implementation focuses primarily on addressing the current use-cases for DirectML and HLSL intrinsics.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backend:DirectX
question
A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Originally posted by @bogner in #87367 (comment)
Justin's lowering table shows we don't need our own intrinsic here
The text was updated successfully, but these errors were encountered: