-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
[AMDGPU] Fix HasFP32Denormals
check in FDIV32 lowering
#66212
Conversation
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.
Missing test changes.
This is also a stop gap, we really need to address the fixme later and restore the correct mode
@llvm/pr-subscribers-llvm-globalisel @llvm/pr-subscribers-backend-amdgpu ChangesFixes SWDEV-403219 -- Full diff: https://github.com//pull/66212.diff1 Files Affected:
diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp index 777fe76df1151cd..998904bf08820c0 100644 --- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp +++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp @@ -9589,7 +9589,7 @@ SDValue SITargetLowering::LowerFDIV32(SDValue Op, SelectionDAG &DAG) const { const SIMachineFunctionInfo *Info = MF.getInfo<SIMachineFunctionInfo>(); const DenormalMode DenormMode = Info->getMode().FP32Denormals; - const bool HasFP32Denormals = DenormMode == DenormalMode::getIEEE(); + const bool HasFP32Denormals = DenormMode != DenormalMode::getPreserveSign(); if (!HasFP32Denormals) { // Note we can't use the STRICT_FMA/STRICT_FMUL for the non-strict FDIV |
0f23a32
to
a394495
Compare
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.
Also need the equivalent change for globalisel
a394495
to
74ec83d
Compare
Fixes SWDEV-403219
74ec83d
to
97af8bb
Compare
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.
Please fix the dynamic mode restore in a follow up
@@ -4737,7 +4737,7 @@ bool AMDGPULegalizerInfo::legalizeFDIV32(MachineInstr &MI, | |||
|
|||
// FIXME: This mishandles dynamic denormal mode. We need to query the |
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.
This is still broken, we're just changing the mode incorrectly in the other direction
Fixes SWDEV-403219
Fixes SWDEV-403219
Fixes SWDEV-403219